# How to apply onComplete to GTween(gskinner) motion tweener?

**URL:** <https://forum.kirupa.com/t/how-to-apply-oncomplete-to-gtween-gskinner-motion-tweener/294007>\
**Category:** flash\
**Created:** [August 6, 2009, 9:09pm UTC](https://forum.kirupa.com/t/how-to-apply-oncomplete-to-gtween-gskinner-motion-tweener/294007 "2009-08-06T21:09:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrealist](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jrealist](https://forum.kirupa.com/u/jrealist)\
**Post date:** [August 6, 2009, 9:09pm UTC](https://forum.kirupa.com/t/how-to-apply-oncomplete-to-gtween-gskinner-motion-tweener/294007/1 "2009-08-06T21:09:18Z")

</div>

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](http://www.gotoandlearn.com/play?id=112)) . My action script is below.

Thank You.

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