Solved

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

Posted on 2003-11-02
3
259 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
ID: 9669380
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
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): …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

785 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