button: Jumping from any frame to frame+n

  • gobstopper
  • Born
  • Born
  • No Avatar
  • Joined: Aug 17, 2006
  • Posts: 2
  • Loc: Australia
  • Status: Offline

Post August 17th, 2006, 2:44 am

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.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 17th, 2006, 2:44 am

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post August 17th, 2006, 12:33 pm

is this simple enough?
Code: [ Select ]
_parent._parent.gotoAndPlay(_parent._parent._currentframe +10);
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • gobstopper
  • Born
  • Born
  • No Avatar
  • Joined: Aug 17, 2006
  • Posts: 2
  • Loc: Australia
  • Status: Offline

Post August 18th, 2006, 8:40 pm

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 40 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.