PDA

View Full Version : How do I bounce image in then fade?



blurryLine
June 27th, 2007, 10:05 AM
Newbie here...I have a logo zooming in, bouncing and then fading. I sort of have it working. The image zooms, bounces, and fades, but then it displays the image completely meaning the fade is not permanent. Below is the actionscript. How do I get it to stay faded?


import fl.transitions.*;
import fl.transitions.easing.*;
import fl.transitions.Tween;

TransitionManager.start(wired, {type:Fade, direction:Transition.OUT, duration:5, easing:Strong.easeIn});
TransitionManager.start(wired,{type:Zoom,direction :0,duration:2,easing:Bounce.easeOut});

LeiaGraf
June 28th, 2007, 09:18 PM
I vaguely remember something about "when action finished, do this"...

Okay, according to the help file, this is what you do in AS2.0... I know you're probably using 3, but this might give you a place to go from.

import mx.transitions.Tween;import mx.transitions.easing.*;var tween_handler:Tween = new Tween(ball_mc, "_alpha", Strong.easeIn, 100, 0, 3, true);tween_handler.onMotionFinished = function() { trace("onMotionFinished triggered");};

I'm looking for the answer in AS3, but I have to admit it's not my strong point.

carlnunes
October 22nd, 2007, 05:56 AM
Combining the TransitionManager and Tween classes (http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000968.html)


import mx.transitions.*;
import mx.transitions.easing.*;

var mcl_obj:Object = new Object();
mcl_obj.onLoadInit = function(target_mc:MovieClip) {
new Tween(target_mc, "_alpha", Strong.easeIn, 0, 100, 2, true);
TransitionManager.start(target_mc, {type:Fly, direction:Transition.IN, duration:3, easing:Elastic.easeInOut, startPoint:6});
};

var my_mcl:MovieClipLoader = new MovieClipLoader();
my_mcl.addListener(mcl_obj);
my_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", this.createEmptyMovieClip("img_mc", this.getNextHighestDepth()));