Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can I apply onComplete to GTweener (gskinner) ?

Guest
Aug 06, 2009 Aug 06, 2009

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});

TOPICS
ActionScript
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 06, 2009 Aug 06, 2009

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

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 06, 2009 Aug 06, 2009

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,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 06, 2009 Aug 06, 2009
LATEST

You're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines