Fly out menu using movies


step1: First of all say your movie contains three buttons, ex features, contact, aboutus.
Make the above buttons(or whatever or how many ever depending on your requirement)

step2: Make three movies. This is done by Insert>NewSymbol>Movieclip. Name your movieclips
accordingly. ex features refers to the movie named features. Your movie clips can contain anything.
Either an animation or another set of optionbuttons which come under the main button.

ex: Features(main button)
Asp, Flash, Java, Javascript, VB etc(optionbuttons)

step3: Making your movie clip

See to it that the first column of keyframes are blank and give a Stop action in any one of them.
your last column of keyframes must also be blank and contain a Stop action.
The last keyframe of your movie should also contain a Stop action in order to avoid looping.

step4: Once the movies are done go to the main scene wher all the main buttons are.
Clicking on Window>Library will show you all the movies in the Library Window.
Drag the movies onto the screen. Once you drag you will see a small circle indicating the first keyframe is blank. Double click on the small circle will take you to the properties Window. Give the Instance name for the movie. Each movie will have a different Instance name.

step 5: Scripting
The script now comes under the main buttons ie Features, Contact, Mutimedia etc
ex: Double click on the Features button. Click On Actions and enter the following code.

On Press
Begin Tell Target("/featuresmovie")
Go to and Play(2)
End tell Target
End On

"Featuresmovie" is the instance name. Go to and play frome frame no 2 of the movie.
The above program just loads the movie when the features button is clicked. This is not enough.
The movie has to unload once the next main button say "Contact" is clicked.
For this to happen enter the following code under the Features button.

On Press
Begin Tell Target("/featuresmovie")
Go to and Play(2)
End tell Target
End On
On Rollover
Begin Tell Target("/contact")
Go to and Stop(1)
End tell Target
End On
On Rollover
Begin Tell Target("/about")
Go to and Stop(1)
End tell Target
End On

The code under Aboutus goes like this:
On Press
Begin Tell Target("/aboutusmovie")
Go to and Play(2)
End tell Target
End On
On Rollover
Begin Tell Target("/featuresmovie")
Go to and Stop(1)
End tell Target
End On
On Rollover
Begin Tell Target("/contact")
Go to and Stop(1)
End tell Target
End On

Repeat the code in the Contact buton also.

The example shown below has just one button.

 

 







Added on July 27, 2007 Comment
}