Publicado por: Alexandre Rudalov em: Abril 9, 2008
Crie um movieclip com o nome de instância “quadro”. E coloque isso no primeiro frame do filme.
MovieClip.prototype.resizeTo = function( width , height ){
var timer = setInterval( function( obj ){
var velx = ( width – obj._width ) / 5;
var vely = ( height – obj._height ) / 5;
obj._width += velx;
obj._height += vely;
if ( ( Math.abs( velx ) <= 0.38 ) && ( Math.abs( vely ) <= 0.38 ) ){
obj._width = width;
obj._height = height;
clearInterval( timer );
}
} , 33 , this );
}
quadro.resizeTo( 260 , 250 );
Comentários