Jump to content
Search Community

my mc won't loop on the main timeline?

TheMightyMac test
Moderator Tag

Recommended Posts

Hi all, I have a problem I can't seem to figure out the answer for. I'm designing a website that opens up with some intro animation and then stops. All of the animation is done with AS3 (GreenSock) and contained on frame 1, as well as the stop(); command. I now want to add a movie clip on the same frame that will have 10 images that will transition from one image to the next and then continually loop while the main timeline is stopped. :cry::cry:

 

Everything works perfectly except that once that movie clip with the image transitions ends it doesn't loop.

 

I don't have a stop command withing that movie clip, just on the main timeline.

 

I am going nuts trying to figure it out because I thought a movie clip should naturally loop even if it is on the main timeline that is stopped.

 

 

Any help would greatly be appreciated.

 

-TheMightyMac-

Link to comment
Share on other sites

I agree, that is not the expected behavior.

 

what happens if you remove the TweenLite code?

will it loop then?

 

if you continue to have this problem, get your file as stripped down as possible in a state that still exhibits this odd behavior and post it here. I'll take a look at it.

 

Carl

Link to comment
Share on other sites

Ok, now I'm stumped...I made a simple animation with this code on frame 1:

 

import com.greensock.*;

import com.greensock.easing.*;

 

TweenLite.from(circle_mc, 1, {x:-100, y:199, ease:Circ.easeInOut});

 

 

It's just a movieclip of a circle that moves in from the left side of the stage and stops. I must have some setting not checked or something because it should just keep looping without a stop(); command. I'm sure this is a very simple fix that I'm overlooking somewhere but for the life of me I can find it.

 

Anyone have any ideas?

 

Thanks in advance,

 

-TheMightyMac-

Link to comment
Share on other sites

although it seems obvious that all you are doing should work.

 

i made a file with a movieclip called mc

 

on mc's timeline I have an image that is scaling down (classic tween)

 

on frame 1 of the main timeline I have

 

TweenLite.to(mc, 3, {x:400});

 

-----------

 

when I test the swf the mc moves to a position of x:400 while the contents of mc scale down over and over and over again during the TweenLite tween and after it is finished.

all as expected.

 

---------

 

if you post your fla (zipped) we can at least determine if your Flash app / swf player is funky

 

Carl

Link to comment
Share on other sites

now I'm confused.

 

I thought you were trying to loop a nested animation inside a movie clip.

 

I now want to add a movie clip on the same frame that will have 10 images that will transition from one image to the next and then continually loop while the main timeline is stopped.

 

Everything works perfectly except that once that movie clip with the image transitions ends it doesn't loop.

 

the file you provided has a movie clip that contains a simple circle shape. (no nested animation)

 

the movieclip is being tweened by TweenLite and it plays its animation once as expected.

 

what exactly are you trying to loop?

Link to comment
Share on other sites

Sorry Carl, I was just trying to boil my question down to a simple form which was probably just more confusing. Maybe if I tell you exactly what I'm trying to do it would be more useful. I have a website that has some intro animation and then stops on frame 1 (all done with actionscript). I then want to have some images transition from one to the next after that intro animation is done (say with an initial delay of 5 secs so that the transitions start after the initial intro animation). Here is the code I will use inside the image transition mc (there will be 10 of these image transitions but I condensed it down to 2 to keep this message smaller):

 

import com.greensock.*;

 

TweenLite.from(bicAdL_mc, 1.5, {delay:5, alpha:0});

TweenLite.to(bicAdL_mc, 1.5, {delay:6, alpha:0});

 

TweenLite.from(closysL_mc, 155, {delay:6.5, alpha:0});

TweenLite.to(closysL_mc, 1.5, {delay:7.5, alpha:0});

 

My goal was to have the images fade in after 5 secs and continue to loop when the maintimeline stops. Here's the curveball, after the first cycle of image transitions I wanted to have the images fade from one to the other without the initial 5 sec delay. I know I can easily do this with traditional motion tweening and a "goto" statement in the mc code but the Greensock tweening is much smoother and cleaner.

 

Again, sorry that I was confusing and I appreciate you taking the time to look at my question.

 

-TheMightyMac-

Link to comment
Share on other sites

Maybe if I tell you exactly what I'm trying to do it would be more useful.

 

I agree.

 

TweenLite tweens do not loop just because there is not a stop() in your code.

 

If you want to loop a single tween twice you would use the repeat property of TweenMax like so

 

TweenMax.to(mc, 1, {alpha:1, repeat:2})

 

if you want to loop a single tween indefinitely:

 

TweenMax.to(mc, 1, {alpha:1, repeat:-1})

 

 

if you want a sequence of tweens to repeat your best bet is to use TimelineMax

 

var mySequence:TimelineMax = new TimelineMax({repeat:-1});

mySequence.append(TweenMax.to(mc, 1, {x:200}));

mySequence.append(TweenMax.to(mc, 1, {y:200}));

mySequence.append(TweenMax.to(mc, 1, {x:0}));

mySequence.append(TweenMax.to(mc, 1, {y:0}));

 

the above code will have a movieclip named mc travel a rectangular path forever.

 

 

Please read the info on greensock.com and the official documentation:

http://www.greensock.com/as/docs/tween/ ... neMax.html

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