Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- totalclips = 65;
- clipnumber = 1;
- // hide all 65 clips on the stage:
- for(i=1; i<=65; i++){
- this["myclip"+i+"_mc"]._visible = false;
- }
- animation = function(who){
- who._visible = true; // shows the clip to be animated
- new mx.transitions.Tween(who, "_alpha", mx.transitions.easing.None.easeNone, 0, 100, 30, false);
- var scaleup = new mx.transitions.Tween(who, "_yscale", mx.transitions.easing.None.easeNone, 150, 0, 150, false);
- var scaleup = new mx.transitions.Tween(who, "_xscale", mx.transitions.easing.None.easeNone, 150, 0, 150, false);
- scaleup.onMotionChanged = function(){
- // this checks to see if we are frame 120 of the scale animation, if so we start to fade out.
- if(scaleup.time == 120){
- new mx.transitions.Tween(who, "_alpha", mx.transitions.easing.None.easeNone, 100, 0, 30, false);
- }
- }
- scaleup.onMotionFinished = function(){
- // this is run if we reach the end of the scaling up animation
- // we then add 1 to the clipnumber:
- clipnumber++; // adds 1 to the clip number
- // if the clipnumber is greater than 65. we do nothing and this code loop stops.
- if(clipnumber == 66){
- // do nothing - it's finished animating all 65.
- }else{
- // 'else' = so we are below 65 so we send the next clip to the animation code:
- animation(this["myclip"+clipnumber+"_mc"]);
- }
- }
- }
- //to start animating all 65 clips, start with clip number 1"
- animation(myclip1_mc);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement