all groups > macromedia flash sitedesign > october 2007 >
You're in the

macromedia flash sitedesign

group:

Help With Building Menu Script


Re: Help With Building Menu Script Sketchsta
10/23/2007 12:00:00 AM
macromedia flash sitedesign:
You have 2 options on coding buttons.
a) place the code on the button symbol itself.
eg..

on(release){
_root.gotoAndPlay("slide1");
}

what this will do is, when the button is Pressed and RELEASED, the playhead
will goto and play frame "slide1" (frame label is slide1)

b) place the code on a frame (reccomended)
sg..

your_btn.onRelease = function(){
_root.gotoAndPlay("slide1");
}

this does the exact same thing, the only difference is that it is placed on a
frame instead of the button symbol its self.
This is a better way to code your flash work, because you can keep all your
code on the one frame which will keep the FLA clean, and verry easy to edit in
the future.

NOTES:
- TO LABEL A FRAME, select the frame you wish to give a label to, then at the
bottom left of your screen in the properties inspector, you will see a text
field, this is where you specify a frame name of your choice.
- _root means your MAIN timeline. I suggest you make a new movieClip
(Ctrl+F8) make sure you chose Movie Clip as the type, and give it a NAME, then
place all your buttons inside that movieClip's time line.


Hope this helps you out abit.
Help With Building Menu Script raypalmer
10/23/2007 12:01:29 AM
New to Flash so excuse the basic quistion ...I?m building a menu driven project
which contains mainly slides and movies.

I?ve built a text menu and have figured out how to make the text a button f8
and then f9 however not sure how to code the script so when the text is
selected the slide I?m linking it to within the project appears.

AddThis Social Bookmark Button