Solved

Movieclip: Play next 10 frames then go to another specified frame in same clip

Posted on 2003-11-02
3
255 Views
Last Modified: 2008-02-01
I have a movieclip of a panel that slides up with a title on it. When you press another button that panel disappears and the movieclip of the new panel slides up. What I would like is for the original panel to slide down (when another button is pressed) before the next title panel slides up, not just disappear. Does anyone know the actionscript for this.

Thanks
Steve S.
*** advertising removed by Netminder, Site Admin ***
0
Comment
Question by:mcpsteves
3 Comments
 
LVL 5

Accepted Solution

by:
Calron earned 125 total points
Comment Utility
Let's assume you have all these separate animations in one movieclip. YOu have to make sure that you add the following command at the end of the panel disappearing animation:

gotoAndPlay(_global.nextAnimation);


Then in the button that should slide out the first panel and then slide in the next panel you need to add this code:

on (release) {
  _global.nextAnimation = 25;  // this has to be the frame number of the new panel sliding in
  gotoAndPlay(50);        // the frame number of the animation of the panel sliding out.
}


Now if you have different panels that have different animations sliding out you will have to take two variables along:

_global.nextAnimation  for the animation of the sliding in
_global.lastAnimation  for the animation of the sliding out

YOu ill have to make sure that you set _global.lastAnimation to the correct frame number when your movie starts, but then you can change the aboce code to this and it will work as well:

on (release) {
   var last = _global.lastAnimation;  // important, else we overwrite this value when we still need it
  _global.nextAnimation = 25;  // this has to be the frame number of the new panel sliding in
  _global.lastAnimation = 35;  // the frame number of the sliding out of the new panel
  gotoAndPlay(last);        // plays the sliding out of the current panel
}
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now