Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TransitionManager - not all transitions work... 1

Status
Not open for further replies.

AP81

Programmer
Apr 11, 2003
740
AU
Hi,

I have been playing around with the transition manager (Flash 8) but have found that not all transitions work.

I have one timeline (60 frames) with a movieclip (imageHolder)that randomly displays an image.
At the end of the 60 frames, I loop back to frame 1 to display another random image.

What I am trying to do is have different transition effects.

Code:
import mx.transitions.*;
import mx.transitions.easing.*;

I have found that the following work:
Code:
TransitionManager.start(imageHolder,{type:Fade,direction:Transition.IN, duration:1.5,easing:None.easeNone});
TransitionManager.start(imageHolder,{type:Fly,direction:Transition.IN, duration:1.5, easing:Elastic.easeOut, 	startPoint:9}); 
TransitionManager.start(imageHolder, {type:Zoom,direction:Transition.IN, duration:2,easing:Elastic.easeOut});
TransitionManager.start(imageHolder, {type:Rotate,direction:Transition.IN, duration:3,easing:Strong.easeInOut,ccw:false, degrees:180});
TransitionManager.start(imageHolder, {type:Photo,direction:Transition.IN, duration:1,easing:None.easeNone});

These have no effect or result in a blank screen:
Code:
TransitionManager.start(imageHolder, {type:Iris,		direction:Transition.IN, duration:2,easing:Strong.easeOut,	startPoint:5, shape:Iris.CIRCLE}); 
TransitionManager.start(imageHolder, {type:PixelDissolve,direction:Transition.IN, duration:2,easing:None.easeNone,xSections:10,ySections:10}); 
TransitionManager.start(imageHolder, {type:Squeeze,direction:Transition.IN, duration:2,easing:Elastic.easeOut,dimension:1}); 
TransitionManager.start(imageHolder, {type:Wipe,		direction:Transition.IN, duration:2,easing:None.easeNone,	startPoint:1}); 
TransitionManager.start(imageHolder, {type:Blinds,direction:Transition.IN, duration:1.5,easing:None.easeNone,numStrips:10,dimension:0});

I have also tried these in a new flash with a static movie clip and they still don't work.

Am I doing something wrong?

Thanks,
Adam


------------------------------------
There's no place like 127.0.0.1
------------------------------------
 
import mx.transitions.*;
import mx.transitions.easing.*;
TransitionManager.start(imageHolder, {type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});

Above works for me. Make sure you have a MovieClip named "imageHolder" on Stage.

Kenneth Kawamoto
 
Hi,

Thanks for the advice kennethkawamoto. I found that all of the transitions work if the images are already loaded into a movie_clip, for example:

This will work:
Code:
import mx.transitions.*;
import mx.transitions.easing.*;
TransitionManager.start(imageHolder, {type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});

But this will not work:
Code:
import mx.transitions.*;
import mx.transitions.easing.*;
imageHolder.loadMovie('c:\test.jpg', 1);
TransitionManager.start(imageHolder, {type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});

Any ideas as to what I am doing wrong?


------------------------------------
There's no place like 127.0.0.1
------------------------------------
 
Excellent oldnewbie. Thanks heaps.


------------------------------------
There's no place like 127.0.0.1
------------------------------------
 
Got it working...The trick was to use a listener and call the transition in the onLoadInit. onLoadComplete did not work for all transitions.

Code:
var mclListener:Object = new Object();
mclListener.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 image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);

image_mcl.loadClip(image[0], picture);


------------------------------------
There's no place like 127.0.0.1
------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top