Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2003-11-02
3
Medium Priority
?
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
Calron earned 500 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

715 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