|
|
|
|
|
|
|
|
Record 14: Scripting Mask
var m:Object=new Object();
m.onLoadInit=function(target_mc:MovieClip)
{
target_mc._visible=false;
target_mc._x=(Stage.width-target_mc._width)/2;
target_mc._y=(Stage.height-target_mc._height)/2;
var mask:MovieClip=target_mc.createEmptyMovieClip("mask_mc",20);
with(mask)
{
beginFill(0xFF00FF,100);
moveTo(0,0);
lineTo(target_mc._width,0);
lineTo(target_mc._width,target_mc._height);
lineTo(0,target_mc._height);
lineTo(0,0);
endFill();
}
target_mc.setMask(mask);
target_mc._visible=true;
}
var mask_tween:Object=new Tween(mask,"_ysacle",0,100,2,true);
this.createEmptyMovieClip("img_mc",10);
var i:MovieClipLoader=new MovieClipLoader();
i.addListener(m);
i.loadClip("Sunset.jpg",img_mc); |
|
|
|
|
|
|
|
|
|
|
|
|