Jump to content
Search Community

onComplete confusion

tc9828 test
Moderator Tag

Recommended Posts

Hi all,

 

I've looked through the forum and tried various suggestions,

but I can't seem to get this right. I have a MC in the Main timeline

that plays a series of tweens and then when finished should

got to the next frame (2) but it doesn't. I've tried moving

my stop(); around but if I don't include it then it jumps immediately

to frame two. I know this is probably something very basic, but I can't seem

to get it going. Any help would be greatly appreciated.

 

edit: I've also tried using a function ie: onComplete:myFunction, but without the

onCompleteParams as I expected it to simply refer to the argument within the function.

 

Thanks very much in advance

 

T.

 

Code is as follows;

import gs.*; 
import gs.TweenLite;
import gs.easing.*

menuAnimation();

function menuAnimation():void {
TweenLite.to(bg1_mc, 0.25, {x:0, ease:Quart.easeOut});
TweenLite.to(bg2_mc, 0.25, {delay:.25, x:0, ease:Quart.easeOut});
TweenLite.to(bg3_mc, 0.25, {delay:.5, x:0, ease:Quart.easeOut});
TweenLite.to(bg4_mc, 0.25, {delay:.75, x:0, ease:Quart.easeOut});
TweenLite.to(bg5_mc, 0.25, {delay:1, x:0, ease:Quart.easeOut});
TweenLite.to(bg6_mc, 0.25, {delay:1.25, x:0, ease:Quart.easeOut});
TweenLite.to(bg7_mc, 0.25, {delay:1.50, x:0, ease:Quart.easeOut});
TweenLite.to(bg8_mc, 0.25, {delay:1.75, x:0, ease:Quart.easeOut});
TweenLite.to(bg9_mc, 0.25, {delay:2, x:0, ease:Quart.easeOut});
TweenLite.to(bg10_mc, 0.25, {delay:2.25, x:0, ease:Quart.easeOut});
TweenLite.to(green_banner_mc, 0.5, {delay:2.5, y:36, ease:Elastic.easeInOut});
TweenLite.to(banner_text_mc, 0.5, {delay:2.75, alpha:1, ease:Back.easeIn});
TweenMax.to(banner_text_mc,.75,{delay:4, bevelFilter:{blurX:10, blurY:10, strength:1.25, distance:6, onComplete:gotoAndStop, onCompleteParams:[2]}});
}

stop();

Link to comment
Share on other sites

I don't see any obvious problems (other than a little confusion about why you're using such an old version of the platform - you must be on v10 or earlier judging by your import statements). Please post a sample FLA that demonstrates the issue so we can publish and see for ourselves.

Link to comment
Share on other sites

Oh, I see the problem. You nested your onComplete and onCompleteParams INSIDE the bevelFilter object. Don't do that :)

 

BAD:

TweenMax.to(banner_text_mc,.75,{delay:4, bevelFilter:{blurX:10, blurY:10, strength:1.25, distance:6, onComplete:gotoAndStop, onCompleteParams:[2]}});

 

GOOD:

TweenMax.to(banner_text_mc,.75,{delay:4, bevelFilter:{blurX:10, blurY:10, strength:1.25, distance:6}, onComplete:gotoAndStop, onCompleteParams:[2]});

Link to comment
Share on other sites

Thank you so much! You rock.

It seems as though it always the 'simplest'

things that catch me out.

 

Again, I really appreciate it. I plan on

becoming 'shockingly green' very soon.

It's a fantastic product with great support

and everyone should support it in any way possible!

 

All the best,

T

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...