Redimencionando objetos!
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 );
Entry Filed under: Action Script, Flash. .
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed