[SOLVED] Menu Slider issue

Hi,
This might be a bit of a specialised question but…

I’m using a Menu Slider by IgnisDesign, from here:
Website

It’s got a gotoSlide function that can snap to a specific slide, excellent for guiding players to specific slides or returning to a specific slide when they return to the Menu.

However, whenever i use it, it always loads and shows the previous slide first before snapping.

So if i use this upon level load.

gotoSlide(3,"snap")

it shows slide 2 and then snaps to slide 3.

I can’t figure out a way to make it instant.
Or perhaps do it during the level loading (use director) so it’s already snapped and ready when the user see’s it.
Like i said it’s quite a, ‘if you’ve used it you might know’ type of question.

But thanks anyway.

Matt
[import]uid: 91798 topic_id: 18823 reply_id: 318823[/import]

How about :

  1. Load your scene
  2. Start the slider after a slight delay (ie)
timer.performWithDelay(200, startSlide)  

That might help [import]uid: 84637 topic_id: 18823 reply_id: 72489[/import]

Ha yeah that solved the problem.

I figured out what the problem was but i didn’t know why
The problem was that when i go into that scene the director shows it immediately then does the fade effects.
This was most evident when i changed the director transition fade time to 5000, it would:

  • load the scene immediately (showing wrong Slide)
  • then do an incredible slow fade out (which should have been done before it switched scenes)
  • gotoSlide takes place
  • then an incredibley slow fade in.
    (This doesn’t happen on any other scenes i have so it must have been something in that scene)

But like i said it works, instead of doing a initSlide() i added a:

timer.performWithDelay(200, initSlide) 

and it works great!
Thanks Danny.

[import]uid: 91798 topic_id: 18823 reply_id: 72494[/import]