Copy link to clipboard
Copied
Hi,
I am trying to add an onComplete with staticRate to the (gskinners) GTween in an attempt to Optimization the SWF Framerate similar to what Lee Brimelow has done in the following project (http://www.gotoandlearn.com/play?id=112) . My action script is below.
- PS
Please let me know if this make sense ... maybe I am asking the question incorrectly.
Thank You for your help.
public function staticRate():void{
stage.frameRate=5;
}
public function animationRate():void {
stage.frameRate=30;
}
private function onClick(e:MouseEvent):void {
trace("BUTTON: SINGLE CLICKED");
animationRate();
var tw:GTween=new GTween(container,0.8,{rotationY:Math2.toDeg(e.curr entTarget.angle+Math.PI/2),z:100},{ease:Exponential.easeInOut,delay:0.1});
Copy link to clipboard
Copied
I am not familiar with GTween, but based on a little Googling you can try the following...
tw.addEventListener(Event.COMPLETE, handleComplete);
function handleComplete(e:Event):void {
//whatever
}
Copy link to clipboard
Copied
Hi Ned,
Thank You for your help. I actually went to gkinner.com (http://gskinner.com/blog/archives/2008/08/gtween_a_new_tw.html) and got the same answer you gave me and it worked. So you were right on with your answer.
Thanks Again,
Copy link to clipboard
Copied
You're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now