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

Required

Required, hidden

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


O conteúdo aqui postado não oferece garantias, nem confere direito a quem lê. Nenhum parágrafo isolado ou mesmo texto por inteiro deverá ser levado em consideração, especialmente a sua existência, excepcionalmente uma breve referência à Crônicas Atípicas, pois, assim como lá, nada aqui é feito, escrito, criado, ou copiado com o intuito de se ter vantagem contada. Desfrute enquanto durar o estoque.

Calendário

Abril 2008
S T Q Q S S D
« Mar   Mai »
 123456
78910111213
14151617181920
21222324252627
282930  

Tags

Action Script Asp Awards Cartoon CSS Desenhos Diversos Downloads Eventos Flash Flash + Asp Flash + PHP html Imagens Internet Inutilidades JavaScript Jogos Links Úteis Matérias Photoshop Portifólio Web Revistas Vídeos XML

Últimos posts

Categorias

Comentários Recentes

Alexandre Rudalov em Menu Dinâmico Flash+XML
Lisa em Menu Dinâmico Flash+XML
Alexandre Rudalov em Microboard Ellite 3G - Cl…
boca em Microboard Ellite 3G - Cl…
Abrindo PopUp no Fla… em Flash: Popup no Flash

Arquivos

Links

Feeds

RSS Myatã Tribo

Visitas deste Blog

RSS RSS Rudalov.com