Im trying to get implement the transitionsmanager in the actionscript below, but can only get a few of them to work through simple functions such as
function zoomMovie(){
mx.transitions.TransitionM
anager.sta
rt(temp, {type:mx.transitions.Zoom,
direction:mx.transitions.T
ransition.
IN, duration:1, easing:mx.transitions.easi
ng.Bounce.
easeOut});
}
I can also make the fade- and rotate-transitions work, but the rest of the transitions seems totally unreachable.
var XMLFile:XML;
XMLFile = new XML();
XMLFile.ignoreWhite = true;
XMLFile.load("bugs5.xml");
XMLFile.onLoad = function(success) {
i=0;
if (success) {
while(i<this.firstChild.ch
ildNodes.l
ength) {
MC = this.firstChild.childNodes
[i].attrib
utes.type;
Level = this.firstChild.childNodes
[i].attrib
utes.level
;
xPos = this.firstChild.childNodes
[i].attrib
utes.xPosi
tion;
yPos = this.firstChild.childNodes
[i].attrib
utes.yPosi
tion;
xPer = this.firstChild.childNodes
[i].attrib
utes.xPerc
ent;
yPer = this.firstChild.childNodes
[i].attrib
utes.yPerc
ent;
transNum = this.firstChild.childNodes
[i].attrib
utes.trans
No;
myText = this.childNodes[1].childNo
des[0].fir
stChild.no
deValue;
Level = Number(Level);
xPos = Number(xPos);
yPos = Number(yPos);
xPer = Number(xPer);
yPer = Number(yPer);
transNum = Number(transNum);
containerMc = "container_mc"+i;
_root.createEmptyMovieClip
(container
Mc,Level);
temp = eval("_root."+containerMc)
;
temp._x = xPos;
temp._y = yPos;
temp._xscale = xPer;
temp._yscale = yPer;
temp.loadMovie(MC);
if(transNum == 1){
zoomMovie();
}
if(transNum == 2){
rotateMovie();
}
if(transNum == 3){
fadeMovie();
}
if(transNum == 4){
wipeMovie();
}
if(transNum == 5){
flyMovie();
}
if(transNum == 6){
blindsMovie();
}
i++;
}
}
}
function zoomMovie(){
mx.transitions.TransitionM
anager.sta
rt(temp, {type:mx.transitions.Zoom,
direction:mx.transitions.T
ransition.
IN, duration:4, easing:mx.transitions.easi
ng.Bounce.
easeOut});
}
function fadeMovie(){
mx.transitions.TransitionM
anager.sta
rt(temp, {type:mx.transitions.Fade,
direction:mx.transitions.T
ransition.
IN, duration:4, easing:mx.transitions.easi
ng.Bounce.
easeOut});
}
function rotateMovie(){
mx.transitions.TransitionM
anager.sta
rt(temp, {type:mx.transitions.Rotat
e, direction:mx.transitions.T
ransition.
IN, duration:4});
}
function wipeMovie(){
mx.transitions.TransitionM
anager.sta
rt(temp, {type:mx.transitions.Wipe,
direction:mx.transitions.T
ransition.
IN, duration:4});
}
function flyMovie(){
mx.transitions.TransitionM
anager.sta
rt(temp, {type:mx.transitions.Fly, direction:mx.transitions.T
ransition.
IN, easing:Elastic.easeInOut, startPoint:6});
}
function blindsMovie(){
mx.transitions.TransitionM
anager.sta
rt(temp, {type:mx.transitions.Blind
s, direction:mx.transitions.T
ransition.
IN, duration:2, easing:mx.transitions.easi
ng.None.ea
seNone, numStrips:10, dimension:9});
}
Ive tried to place setIntervals in case that would be a problem, but that doesnt seem to help.
Maybe I should use the MovieClipLoader.loadClip-m
ethod instead, but there Im a little lost
Start Free Trial