Tema: Movimiento
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/04/2009, 10:25
Avatar de Lynxcraft
Lynxcraft
 
Fecha de Ingreso: noviembre-2007
Ubicación: yecla murcia
Mensajes: 1.346
Antigüedad: 19 años
Puntos: 51
Respuesta: Movimiento

yo utilizo funciones como esto
Código PHP:
import mx.transitions.easing.*;
import mx.transitions.Tween;
boton.onRollOver=function(){
    var 
ty:Tween = new Tween(boton, "_y",null, boton._y,350, 1, true);
}
boton.onRollOut=function(){
    var 
ty:Tween = new Tween(boton, "_y",Elastic.easeOut, boton._y,600, 1, true);
} 
para ver un ejemplo de como funciona simplemente crea un archivo nuevo y el primer fotograma pega este código asi veras mejor como funciona
///CCREA BOTON ___________________

Código PHP:
import flash.display.BitmapData;
import flash.filters.BevelFilter;
import flash.geom.Point;

var 
myBitmapData:BitmapData = new BitmapData(100, 300, true, 0xCCCCCCCC);
var 
boton:MovieClip = this.createEmptyMovieClip("boton", this.getNextHighestDepth());
var 
mc:MovieClip = boton.createEmptyMovieClip("mc", boton.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
mc._x=-50
mc
._y=-300


boton
._x=200
boton
._y=600

import mx
.transitions.easing.*;
import mx.transitions.Tween;
boton.onRollOver=function(){
    var 
ty:Tween = new Tween(boton, "_y",null, boton._y,350, 1, true);
}
boton.onRollOut=function(){
    var 
ty:Tween = new Tween(boton, "_y",Elastic.easeOut, boton._y,600, 1, true);
} 
__________________
Sobran las ideas cuando faltan ganas de trabajar en ellas
Lynxcraft