all groups > flash actionscript > may 2005 >
You're in the

flash actionscript

group:

Actionscripting help with navigation?


Actionscripting help with navigation? loozle
5/16/2005 12:00:00 AM
flash actionscript:
Just a few weeks into Flash and am having navigation issues.

What I'm lost on is how I set up a button, which when clicked, will go to a
specified frame or label and then have it play, say frames 15 - 44 and then
stop.

I'm guessing this is actionscripting but so far nothing I've tried in that has
worked, so as it's happened many times before, I'm probably wrong.

I have converted a powerpoint presentation and created all the tweens
necessary to get it to look like the powerpoint presentation on a frame by
frame basis. Now I just need to let people navigate forwards and backwards and
have it play for them.

thanks,
elz
Re: Actionscripting help with navigation? SMakinson
5/16/2005 12:00:00 AM
Easiest way to do it would be:

Click on your button on the stage, press F9 to open the actions.
type:
on(release){
gotoAndPlay(SOME_FRAME_OR_LABEL);
}

If you are not trying to make the _root play, you will need to add the path to
the clip you are trying to play before gotoAndPlay.

While this is the easiest way it is also not the best since you will be
scattering code all over the place. If its a small presentation this may be
just fine though.
Re: Actionscripting help with navigation? Fatmat
5/16/2005 12:00:00 AM
Re: Actionscripting help with navigation? SMakinson
5/16/2005 12:00:00 AM
Re: Actionscripting help with navigation? loozle
5/16/2005 12:00:00 AM
Ok, tried the behaviors thing, but this still is not working. At least not the
way I imagined it would.

If any of you would be so kind as to check out
http://www.labsysgrp.com/flash/webedit.zip and tell me where I am going wrong I
would certainly appreciate it. I've chopped off most of the frames and things
in the library so it's only a 1.5mb zip right now.

What I am trying to do is have the first 'slide' (frames 1-60) start playing
when the file is opened. Then, when the forward slide button is clicked have
it go to frame 61 and play to frame 85 and stop there. Then when the forward
button is pressed, have it go to frame 86 and play and then stop at frame 111.

Lather. Rinse. Repeat.

Any help would be most welcome.
Re: Actionscripting help with navigation? SMakinson
5/17/2005 12:00:00 AM
In order to stop your slides, on any frame that you awnt it to stop open the
actions panel while the fame is selected and type:

stop();

Also I see you have given lable names as numbers, I would change those to
something descriptive such as:
section1 or features

Since gotoAndPlay can also take a frame number as the argument you should not
use simple numbers as labels.

See if that helps.
Re: Actionscripting help with navigation? SMakinson
5/17/2005 12:00:00 AM
Re: Actionscripting help with navigation? loozle
5/17/2005 12:00:00 AM
Thank you so much for the help. I wasn't even looking in the right place to
get this to work properly as I had fouled it up so much to begin with.

Now, it works jsut like I had hoped.

THanks agian!
Re: Actionscripting help with navigation? SMakinson
5/17/2005 12:00:00 AM
AddThis Social Bookmark Button