import mx.transitions. *;
import mx.transitions.easing. *;
//缩放效果
new Tween(img1, "_xscale", None.easeOut, 100, 200, 3, true);
new Tween(img1, "_yscale", None.easeOut, 100, 200, 3, true);
//tween语法
//new Tween(target,property,function,start,end,duration,second(true) or frame(false))
TransitionManager.start(img2, {type:Zoom, direction:0, duration:3, easing:None.easeInOut, param1:empty, param2:empty})
//direction 0为in,1为out
还有Fly效果 {type:Fly,direction:0-9,
switch (dataArray [indexID].tEffect.toString())
{
case "p_mosaic1" :
//横向卷帘
TransitionManager.start (dataArray [indexID].showMC,
{
type : Blinds, direction : Transition.IN, duration : 2, easing : None.easeNone, numStrips : 10, dimension : 0
})
break;
case "p_mosaic2" :
//纵向卷帘
TransitionManager.start (dataArray [indexID].showMC,
{
type : Blinds, direction : Transition.IN, duration : 2, easing : None.easeNone, numStrips : 10, dimension : 1
})
break;
case "p_mosaic3" :
//淡入效果
TransitionManager.start (dataArray [indexID].showMC,
{
type : Fade, direction : Transition.IN, duration : 2, easing : None.easeNone
})
break;
case "p_mosaic4" :
//圆形打开
TransitionManager.start (dataArray [indexID].showMC,
{
type : Iris, direction : Transition.IN, duration : 2, easing : Strong.easeOut, startPoint : 2, shape : Iris.CIRCLE
})
break;
case "p_mosaic5" :
//淡入闪光
TransitionManager.start (dataArray [indexID].showMC,
{
type : Photo, direction : Transition.IN, duration : 2, easing : None.easeNone
})
break;
case "p_mosaic6" :
//棋盘马赛克
TransitionManager.start (dataArray [indexID].showMC,
{
type : PixelDissolve, direction : Transition.IN, duration : 2, easing : None.easeNone, xSections : 10, ySections : 10
})
break;
case "p_mosaic7" :
//向右下侧卷帘
TransitionManager.start (dataArray [indexID].showMC,
{
type : Wipe, direction : Transition.IN, duration : 2, easing : None.easeNone, startPoint : 1
});
break;
case "p_mosaic8" :
//向下卷帘
TransitionManager.start (dataArray [indexID].showMC,
{
type : Wipe, direction : Transition.IN, duration : 2, easing : None.easeNone, startPoint : 2
});
break;
case "p_mosaic9" :
//向左下侧卷帘
TransitionManager.start (dataArray [indexID].showMC,
{
type : Wipe, direction : Transition.IN, duration : 2, easing : None.easeNone, startPoint : 3
});
break;
case "p_mosaic10" :
//各种卷帘
TransitionManager.start (dataArray [indexID].showMC,
{
type : Wipe, direction : Transition.IN, duration : 2, easing : None.easeNone, startPoint : 4
});
break;
case "p_mosaic11" :
TransitionManager.start (dataArray [indexID].showMC,
{
type : Wipe, direction : Transition.IN, duration : 2, easing : None.easeNone, startPoint : 5
});
break;
case "p_mosaic12" :
TransitionManager.start (dataArray [indexID].showMC,
{
type : Wipe, direction : Transition.IN, duration : 2, easing : None.easeNone, startPoint : 6
});
break;
case "p_mosaic13" :
TransitionManager.start (dataArray [indexID].showMC,
{
type : Wipe, direction : Transition.IN, duration : 2, easing : None.easeNone, startPoint : 7
});
break;
case "p_mosaic14" :
TransitionManager.start (dataArray [indexID].showMC,
{
type : Wipe, direction : Transition.IN, duration : 2, easing : None.easeNone, startPoint : 8
});
break;
case "p_mosaic15" :
TransitionManager.start (dataArray [indexID].showMC,
{
type : Wipe, direction : Transition.IN, duration : 2, easing : None.easeNone, startPoint : 9
});
break;
default :
TransitionManager.start (dataArray [indexID].showMC,
{
type : Fade, direction : Transition.IN, duration : 2, easing : None.easeNone
})
break;
}