Código ActionScript :
import caurina.transitions.Tweener;
var vectorA:Array = new Array();
var vectorB:Array = new Array();
var intervalo:int = 100;
var iglobal:int = 0;
var biglobal:int = 0;
var intervalot:Timer = new Timer(intervalo, 0);
var intervalob:Timer = new Timer(intervalo, 0);
function init(){
intervalot.addEventListener(TimerEvent.TIMER, tirarEasing);
intervalot.start();
intervalob.addEventListener(TimerEvent.TIMER, tirarEasingb);
intervalob.start();
}
function guardarpos(){
for(var i:int=1;i<17;i++){
vectorA.push(this["a"+i].x);
this["a"+i].x = -500;
}
for(var j:int=1;j<18;j++){
vectorB.push(this["b"+j].x);
this["b"+j].x = 500;
}
init();
}
guardarpos();
function tirarEasing(event:TimerEvent):void{
iglobal++;
if(iglobal<17){
this["a"+iglobal].x=vectorA[iglobal];
//Tweener.addTween(this["a"+iglobal],{x:vectorA[iglobal],time:.5});
}else {
iglobal = 0;
intervalot.stop();
}
}
function tirarEasingb(event:TimerEvent):void{
biglobal++;
if(biglobal<18){
//trace(biglobal);
this["b"+biglobal].x=vectorB[biglobal];
//Tweener.addTween(this["b"+biglobal],{x:vectorB[biglobal],time:.5});
}else {
biglobal = 0;
intervalob.stop();
}
}El logo original se ve de esta forma: http://www.codigoe-marketing.com/prueba/logoactionOriginal.swf.
El logo animado con el codigo anterior se ve de esta forma: http://www.codigoe-marketing.com/prueba/logoaction.swf.
Obviamente no es el mismo resultado y mucho menos las mismas posiciones, alguien sabe como resolver este problema???
Muchas Gracias!!!
