Jump to content
Search Community

RP520

Members
  • Posts

    2
  • Joined

  • Last visited

RP520's Achievements

0

Reputation

  1. Here is the code I have in my project, incase that helps someone. OverwriteManager.init(OverwriteManager.AUTO); TweenPlugin.activate([TintPlugin]); TweenPlugin.activate([AutoAlphaPlugin]); TweenPlugin.activate([ColorTransformPlugin]); var btnArray:Array = new Array(home_1, home_2, home_3) for each(var i:MovieClip in btnArray) { i.x0 = i.x; i.addEventListener(MouseEvent.CLICK, onTap) } reset(); function onTap(e:*):void { console.appendText("TAPPED\n") var mc:MovieClip = MovieClip(e.currentTarget) addChild(mc) TweenLite.to(mc, 6, { useFrames:true, scaleX: 0.95, scaleY: 0.95, tint: 0xffffff, ease:Sine.easeOut}); //60 TweenLite.to(mc, 18, { useFrames:true, delay:6, scaleX: 1, scaleY: 1, tint: null, ease:Sine.easeOut}); //78 TweenLite.to(mc, 18, { useFrames:true, delay:36, scaleX: 1.1, scaleY: 1.1, ease:Sine.easeOut}); TweenLite.to(home_1, 18, { useFrames:true, delay:36, x:home_2.x0, ease:Sine.easeOut}); TweenLite.to(home_2, 18, { useFrames:true, delay:36, x:home_2.x0, ease:Sine.easeOut}); TweenLite.to(home_3, 18, { useFrames:true, delay:36, x:home_2.x0, ease:Sine.easeOut}); for each(var i:MovieClip in btnArray) { if(i != mc) { TweenLite.to(i, 18, { useFrames:true, delay:36, scaleX: 0.95, scaleY: 0.95, autoAlpha: 0, x:home_2.x0, ease:Sine.easeOut}); } } TweenLite.to(mc, 6, { useFrames:true, delay:54, tint: 0xffffff, ease:Sine.easeOut}); //60 TweenLite.to(mc, 8, { useFrames:true, delay:60, autoAlpha: 0, ease:Sine.easeOut, onComplete:reset}); //60 } function reset():void { trace('reset') TweenLite.to(home_1, 0, {scaleX: 1, scaleY: 1, autoAlpha: 1, x:home_1.x0, tint: null}); TweenLite.to(home_2, 0, {scaleX: 1, scaleY: 1, autoAlpha: 1, x:home_2.x0, tint: null}); TweenLite.to(home_3, 0, {scaleX: 1, scaleY: 1, autoAlpha: 1, x:home_3.x0, tint: null}); }
  2. I have been searching google and these forums and just can't seem to find the answer I need. I am using TweenLite for the first time on an Air for Ios project, and am getting a weird problem. I have multiple TweenLite.to calls with delay so that they happen in sequence when you click a button on the screen. The first time you press the button the animation runs very slowly, the next and every subsequent time you press the button the animation runs at the correct speed. Is there something I need to set on initialization of the project in order to get that correct speed on the initial click? It seems that once the animation has played something has been done to the movieclips involved which allows the animation to go quickly the next time it happens. Thanks for any help you can provide.
×
×
  • Create New...