# TweenMax onComplete gotoAndStop

**URL:** https://forum.kirupa.com/t/tweenmax-oncomplete-gotoandstop/299796
**Category:** flash
**Created:** [November 11, 2009, 5:17am UTC](https://forum.kirupa.com/t/tweenmax-oncomplete-gotoandstop/299796 "2009-11-11T05:17:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![planet51](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@planet51](https://forum.kirupa.com/u/planet51)
#### Post date: [November 11, 2009, 5:17am UTC](https://forum.kirupa.com/t/tweenmax-oncomplete-gotoandstop/299796/1 "2009-11-11T05:17:24Z")

</div>

Hello all  
I’m trying to get onComplete (frame 5 in this case) to skip to a given frame after a series of animations. Here is what i have written so far. Shouldn’t this work?

stop();  
import gs.TweenMax;

import gs.plugins.\*;

TweenPlugin.activate([DropShadowFilterPlugin]);  
import fl.motion.easing.\*;

TweenMax.from (redSquare\_mc, 1, {x: 285, alpha: .5, scaleX:.5 } );  
TweenMax.to(redSquare\_mc, 1, {dropShadowFilter:{color:0x000000, alpha:0.5, blurX:17, blurY:18, angle:45, distance:5}});

function firstFrame():void {

TweenMax.from (yellowCircle\_mc, 3, {x: 600, scaleX: 1, scaleY: 1, alpha: 1, delay: .125})  
TweenMax.to (yellowCircle\_mc, 3, {x: 300, scaleX: .5, scaleY: .5, alpha: .5, ease:Back.easeInOut, delay: 2, onComplete: toNextFrame});

}  
firstFrame();

function toNextFrame():void{  
gotoAndStop(“5”);  
}

Thanks you all in advance
