button: Jumping from any frame to frame+n

  • gobstopper
  • Born
  • Born
  • gobstopper
  • Posts: 2
  • Loc: Australia

Post 3+ Months Ago

Hi, newbie here.

Have some Action Script experience but bit rusty and don't have time to bang head against wall writing a function that will only work if I meditate on hot coals for 4 days. Any help from guru's would save my rear end from a roasting.

I am creating an interactive training movie that has a floating nav with instructions inside the nav that show a user how to use a program.

I need to jump from the current frame on the main timeline from the buttons inside the movie clip but I cant use framenumber or a label as it stops me from being able to show text inside the floating nav that is relevant to a particular frame on the main timeline.

I can get the button to move 10 frames along the timeline fine by using _parent._parent.nextFrame(+10); but you need to click the button 10 times to get to the frame with the next lot of text inside the nav movie_clip.

I want it to jump over frames. Eg. if the user is on frame 5 (_root.timeline) and they click the next button I want it to jump 10 frames so they land at frame 15 but the code needs to know what frame its on. so even if its on frame 13 or 17 it will always jump 10 frames.

I want the button to only have one script on it and it to exsist on 1 frame within its container movie.

tried using _currentFrame(+10) and it does not work.

Is there an obvious way to do this? or do I have to place labels or have the buttons on the frame that show the text with gotoAnd Play (frame (10);

Any help will be returned when I reach guru status.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

is this simple enough?
Code: [ Select ]
_parent._parent.gotoAndPlay(_parent._parent._currentframe +10);
  • gobstopper
  • Born
  • Born
  • gobstopper
  • Posts: 2
  • Loc: Australia

Post 3+ Months Ago

Yes, mate! that's simple enough.
Thanks for your help.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 2 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.