Flashadvisor logo
:: Desktop Shortcut
:: Flash Help
Advices from Experts

 Submit Here! · Link to Us · Newsletter · Tell a Friend ·

      Add Tutorial |

 

Advertise here










 

Google

Search WWW   
FlashAdvisor.com

 Home > Tutorials  > Beginners

Button in a Movie Clip explained

Author: T Norman | Email
Website : www.ntdesigns.net


Advertisement

This seems to be one of the most frequent questions for beginners and many others.

Hopefully, this will explain the mysterious non working buttons inside movie clips.

Once you put a button in a movieClip the typical gotoAndPlay("Scene2",1) will not work...

That is a global function that works on the main timeline only...

So what you need to do is use the MovieClip Method by the same name... it differs in the fact that it only takes only one argument....and that is frameNumber or a frameLabel. FrameLabels when you're dealing with scenes make life a lot easier...so,here's how you do it...

Go to the first frame of the scene and put a "label". To assign a "label" to a frame... Select your frame. Then just go to Window>Panels>Frame and type your label in the Label box.

Then on your button in your movieClip, put this:


on (release) {
_root.gotoAndStop("yourLabel");
}


Of course, replace "yourLabel" with the actual label you put on your frame...

You can enter this in the Expert Mode in the Actions Panel...or to enter this in the Normal Mode in the Actions Panel, scroll down to Objects>MovieClip>gotoAndStop (or gotoAndPlay)......... DoubleClick and it automatically puts the on(release) part of the code.

Then in the Expression box, type the path in front of the dot (in this case, _root). Where it asks for the frame, put in your "label".............be sure to put quotes around it.

| 1 |

Rate This Tutorial :
We hope the information helped you. If you have any questions or comments, please don't hesitate to post them on the Forums section
Submit your Tutorial at Click Here
  

Home | About Us | Contact Us | Feedback | Advertise with us

Best viewed in 800x600 resolution with Internet Explorer.

Site Developed and Hosted by  ethicsolutions.com
All rights reserved with FlashAdvisor

Flash is a registered trademark of Adobe Systems, Inc.

1 user online