Jump to content
Search Community

stumped on onCompleteParams [SOLVED]

LEL test
Moderator Tag

Recommended Posts

I have this great slideshow going but I have the syntax wrong on the onCompleteParams and can't for the life of me figure it out. Its the parent that's giving me grief.

 

Any one out there that can help?

 

onCompleteParams:[parent."gointro"]

 

Thanks!

 

Lisa

Link to comment
Share on other sites

hrm -- ok...

 

the slideshow is in a movieClip "slideshow". when i place a frame on slideshow called gointro, it works just fine,

but when i place a frame on my stage called gointro after the last clip fades out, it never seems to hit that frame.

(i did a trace)

Link to comment
Share on other sites

I don't quite follow - can you post a super-simple (basic) FLA that demonstrates the issue?

 

FYI, if you want your slideshow to gotoAndPlay("gointro") when the tween completes, you'd do:

 

TweenLite.to(mc, 1, {x:100, onComplete:slideshow.gotoAndPlay, onCompleteParams:["gointro"]});

 

(Assuming you're working in AS3)

Link to comment
Share on other sites

I'm sorry, Jack.

 

I am working in AS3

 

My tween is in a MC called slideshow and when it completes i need it to go to the frame "gointro" on the main timeline.

 

Here's the code i'm using:

myTimeline.insertMultiple( TweenMax.allTo(fadeOutClips, 4, {autoAlpha:0, onComplete:gotoAndPlay, onCompleteParams:["gointro"]}, 6), 6);

 

Now, if I put a frame called "gointro" in the MC "slideshow", it works fine...but I need for it to go to the "gointro" frame on the main timeline.

Link to comment
Share on other sites

Now I'm having another problem. Its going to the new frame before the slideshow is complete.

Here's my code:

 

var fadeInClips:Array=[img01,img02,img03,img04,img05,img06,img07,img08,img09,img10,img11,img12,img13,img14];
var fadeOutClips:Array=[img01,img02,img03,img04,img05,img06,img07,img08,img09,img10,img11,img12,img13,img14];

TweenMax.allTo(fadeInClips, 0, {autoAlpha:0});//just to make them all invisible first.
var myTimeline:TimelineMax = new TimelineMax();
myTimeline.insertMultiple( TweenMax.allTo(fadeInClips, 4, {autoAlpha:1}, 6) );
myTimeline.insertMultiple( TweenMax.allTo(fadeOutClips, 4, {autoAlpha:0, onComplete:gotoAndPlay, onCompleteParams:["gointro"]}, 6), 6);

Link to comment
Share on other sites

When you do this:

 

TweenMax.allTo(fadeOutClips, 4, {autoAlpha:0, onComplete:gotoAndPlay, onCompleteParams:["gointro"]}, 6);

 

It creates a tween for each object in the fadeOutClips array and each one of those tweens will have an onComplete of gotoAndPlay. So if there are 10 objects, that onComplete function will get called 10 times. I think what you meant to do was use the onCompleteAll parameter of TweenMax.allTo(), like this:

 

TweenMax.allTo(fadeOutClips, 4, {autoAlpha:0}, 6, gotoAndPlay, ["gointro"]);

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...