flash actionscript:
I am trying to use this code on a button in a MC in a scrollpane. I want the button to send the user to a totally different scene in the site. [I need the button to send outside of pane] What can I put in the parentheses that will make it do this? ("Scene" , frame); doesn't work at all and if I just enter ("frame") I end up in different scenes and frames and I don't understand why it sent me there. Does anyone know why this is happening? Or maybe a different version of the code that will work? Or maybe I am crazy and this can't be done? Much obliged!
First, don't use scenes - they don't work the way you think they do. What you need to do is label the frames that start each different "Scene" - (it would be better to load the scenes on the fly when the user clicks them - but that is another issue). try: Scene 1 frame 1 label: "s1_start" Scene 2 frame 1 label: "s2_start" Scene 3 frame 1 label: "s3_start" to send the playhead to these frames: _root.gotoAndPlay("s1_start");
What I ended up doing was counting up each and every frame in my .fla and sent it to the one I wanted from there, and then put a stop action on that scene as well. This works but I am sure it's a weird way of doing things. Scrollpanes make everything very tricky!! Thanks for your advice, I will use that as well, much easier!
NOOOOOOOOOOOOO! Don't use frame numbers - what if you add 1 frame in 1 scene - then you have to redo any code that calles those frames. You should really use frame labels - they are the only effective way of using the timeline.
Don't see what you're looking for? Try a search.
|