flash actionscript:
I want to go to a particular frame in a movie clip by clicking a button, I have this code, can I alter it to do this? on (press) { gotoAndStop("---")} I want to go to the frame name 'info_off' in a movie clip called 'abstract1_m'
probably (with the limited info you have given) use on (press) { abstract1_m.gotoAndStop("info_off"); } -- Jeckyl
Cheers Jeckyl That didnt work, might be my fualt for not telling you that the button that I want to control the movie clip isnt in the movie clip. The movie clipmis in a frame called 'abstract1' on another layer to the button which is on a frame before that lasts the entire flash animation. Im sorry Im a bit simple when it comes to coding stuff . v greatfull for the help
you cannot tell a clip that is not currently placed to do something .. from what you describe, the button is on one frame, but the clip is only on another frame (not present at the same time as button) .. so you cannot do what you want. -- Jeckyl
Well there not on the same layer but are visable at the same time.
But .. is the clip visible at the time you click on the button? The reasons the script won't work would be 1) the clip doesn't exist (or you have gotten the name wrong) 2) the button doesn't exist (or is disabled) 3) the clip exists, but the path to it from the button script is not correct (eg, maybe the clip or button is within another clip, and there needs to be _parent in the path somewhere) 4) the frame label you are trying to go to in the script does not exist (may spelt incorrectly, embedded spaces in the name etc) It isn't going to just not work if everything is correct. And the parts you've shown us are correct now. So there must be something else going on (like the above). You are the only one that had the information and can check all that. I suggest you put some tracing code in the button script . eg on (press) { trace("button press"); trace("abstract1_m="+abstract1_m); trace("abstract1_m_currentframe="+abstract1_m_currentframe); abstract1_m.gotoAndStop("info_off"); trace("abstract1_m_currentframe="+abstract1_m_currentframe); trace("button press done"); } You should see the path to the movie clip displayed, and its current frame number and then the new frame number after the gotoAndStop If you don't ... check all the things above. -- Jeckyl
Don't see what you're looking for? Try a search.
|