Hi friends.
I have a weird situation here. OK this is what going on:
I have 4 buttons on my project main screen. each one do this steps:
Enter:
for **[COLOR=#008080]entrance [/COLOR]**the button call the next button to appear (with some mask animation, assuming its 30 frames length) on its 25th frame.
Exit:
for exit, It sets its number to a [COLOR=#008000]**variable **[/COLOR]and then starts the exit animation and in 25th frame of it exit animation it calls the next button to exit as the same animation. the last button sends the timeline to next frame.
on the next frame with a switch statement on that [COLOR=#008000]**variable **[/COLOR]a **[COLOR=#ff8c00]movieclip [/COLOR]**is send to a specified frame.
the problem is it sometimes (that’s weird because its a code and always should do the same) & Just [COLOR=#800080]one of the buttons[/COLOR] (even weirder because all having the same code and frames and layers etc) goes to next frame after buttons animation ends but [COLOR=#ff8c00]movieclip [/COLOR][COLOR=#ff8c00][/COLOR]is not going to the specified frame and the stop(); code on second frame does not work and it gets back to my menu and starts to to the [COLOR=#008080]entrance[/COLOR] of the buttons! **and its getting more weird that when I run the swf separately from adobe flash the swf act correct more, when adobe flash is running and when I close adobe flash, it goes wrong more! **
the case statement is this:
switch (_root.[COLOR=#008000]itemToShow[/COLOR])
{[INDENT][COLOR=#800080]case 1[/COLOR] : [COLOR=#ff8c00]bg[/COLOR].gotoAndPlay(“First”); [COLOR=#ff0000]** it.text**[/COLOR] = “Practices”; break;
case 2 : [COLOR=#ff8c00]bg[/COLOR].gotoAndPlay(“Second”); it.text = “Lessons”; break;
case 3 : fscommand(“quit”); break;
case 4 : [COLOR=#ff8c00]bg[/COLOR].gotoAndPlay(“Fourth”); break;
[/INDENT]
}
I colorized the code and text so you can find out that, the **[COLOR=#800080]button [/COLOR]**that does wrong is sets the **[COLOR=#008000]variable [/COLOR]**that named **[COLOR=#008000]itemToShow [/COLOR]**to [COLOR=#800080]1[/COLOR] and the **[COLOR=#ff8c00]movieclip [/COLOR]**name is [COLOR=#ff8c00]bg[/COLOR].
one more weird thing is when I click the [COLOR=#800080]**button **[/COLOR]the [COLOR=#ff0000]it.text[/COLOR] in the [COLOR=#800080]case 1[/COLOR], always sets to “Practices”, even when the [COLOR=#ff8c00]bg[/COLOR].gotoAndPlay(“First”); does not work!
Any idea? I changed what ever I thought might causes the problem but nothing happened!
Note: I’m using Adobe Flash Professional CS5.5 V11.5.0.325 from CS5.5 Master Collection.