This content has been marked as final. Show 5 replies
in an actions layer on frame 10, use: gotoAndPlay(20);
then on frame 20, place a: stop();
I probably should have been more specific. I cant add anything to the timeline because I have multiple buttons using the first tween, which is a fade out. Thats why I need a script to add to each button only to play through that first common tween, and then skip to play an individual tween set for each button. Like button 1 goes through the first common tween, a fade out (plays frames 41 - 53) and its individual tween is frames 54 - 66. This works fine of course because the tweens are next to each other. Button 2's individual tween starts on frame 67, so it needs to play through the common tween fade (41 - 53) skip Button 1's frames, and continue play on 67. These buttons are located on frame 1 (main menu) so is it even possible to script a button to do such a thing? I figured there would be but nothing im trying or seeing online is working. Heh... does this make sense? :o
The only other way I know it will work is if I copy and paste all the information in the layers before each section but that causes me to have to push a lot of information further down the timeline, kinda making a big mess and causing me to rescript all frames there.
cool, I gotcha now Jon - what you need to do is to use a variable here. In each button's handler 'set' the variable to the number of the frame you need to jump to, then on frame 10 (or whatever) of the 'common' tween use the variable value to 'jump' to the correct frame for the Tween needed. So set up a var somewhere in the script (not on a frame of the common tween) then 'point' to that variable in the button and assign a value when pressed, like for instance 67. Then at the end of the common Tween, use: gotoAndPlay(jumpNum); (or whatever var name you want) and it'll take the 'new' value assigned by the button and use it to move to that frame.
bingo, done deal :)
Now that sounds like it will work. I knew it had to be some simple script command or something. Ill try it out.
no problem Jon, you're welcome. holler if you run into any trouble.