First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Matt Arenson | Website: http://www.wildinkgc.com

The Action Scripting:

Ok, so we effectively have made a mess, what now? Now we add the action scripting.

On the frame, add the following actions:

vis();
function vis(){
_root.one._visible=false;
_root.two._visible=false;
_root.three._visible=false;
_root.four._visible=false;
_root.five._visible=false;
}

Here's what it does:

vis(); calls the function with the name "vis" below:


function vis(){
_root.one._visible=false;
_root.two._visible=false;
_root.three._visible=false;
_root.four._visible=false;
_root.five._visible=false;
}

This function makes all of the content movie clips you created invisible. It calls each movie clip by its instance name and tells it to go invisible. When a movie clip is invisible, it acts just like it is on another frame altogether: no buttons work, no animations play.

 

Now, On each button add the following code:

on(release){
vis();
_root.one._visible=true;
}

These actions above are for the button that corresponds to the content movie clip with the instance name "one". These actions do a couple things:

1. It calls the "vis" function and makes everything invisible again (just in case this button is not the first one they push)

2. It tells the content movie clip "one" to become visible. This makes it seem as though the movie has changed frames, when it actually has not. Only the content in the movie clip "one" is visible. (The _visible command works like this: false = invisible, true = visible)

Change "_root.one" to each movie clip instance name for each corresponding button.

Keep in mind that this can be triggered from a frame, another movie, a movie clip, etc..

That's it!! Test your movie.

If it does not work, make sure that the "vis" function is on the main timeline and that you have given all content movie clips instance names. Also check that all the names in the action scripting correspond to the actual movie clips' instance names.

Good Luck! I hope you find this little trick as useful as I have!!

PREV

» Level Intermediate

Added: 2005-01-30
Rating: 8 Votes: 4
(10 being the highest)
» Author
http://www.wildinkgc.com
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: S.Saipriya
» Title: Flash Fire Effect
» Description: This tutorial explains about how to create Fire Effect in Flash of Actionscript 2.0.I hope this tutorial helps you!
Featured Sound Loops
Image for equalize

Audio Player

» Author: Aidan Crouzet-Pascal
» Title: Falling Star
» Description: This loop is a cool sounding, E minor loop.
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Brandan Paulin
» Description: Epic sounding loop with Brass, Percussion, Strings and Winds. This is actually part of a Loop Pack called the Coming where you can download the rest of the loops that go with it FREE from my website.