Jump to content
Search Community

Pause with in a timeline in AS2

rob_v_5712 test
Moderator Tag

Recommended Posts

Ok - I think Im losing my mind ;)

 

I asked this question a while ago here :

http://forums.greensock.com/topic/7886-adding-a-pause-during-timelinelite/

and its been working exactly as expected.

However, I had to do a project in AS2, and it does not seem to work.

I need to pause the timeline at a specific frame, wait for user feedback, then resume.

 

Normally I just add this to my timeline where I want the pause :

AS3

  .call(tl.pause,[],13)
 

in AS2 - I have to add the scope so its like this:

  .call(tl.pause,[],this,13)
 
But for some reason, in AS2 it just ignores it.
 
Here is exactly what Im doing :
 
var tl = new TimelineLite();


tl.to(mc, 1, {_x:100},5)
  .from(mc, 1, {_y:-100}, 10)
  .call(trace,['here'],this,12)
  .call(tl.pause,[],this,13)
  .call(trace,['here 2'],this,14)
  .to(mc1, 1, {_alpha:0}, 15);
  

Here is the output, never pausing:
here
here 2

Im sure Im just missing something stupid here!

 

Any help please ;)

 

Thanks

-Rob

 

 
Link to comment
Share on other sites

Well as luck would have it - now I have another problem - I swear, its just been one of those days!

 

For some reason, if I use a timeline w/ frames and pause it, I have issues un-pausing it.

For example:

I have 2 MCs and set up a timeline like this:

var tl = new TimelineLite({useFrames:true});

tl.to(mc0,0, {_alpha:0},1)
  .to(contuneButton,0,{_alpha:0},1)
  .to(mc0, 1, {_alpha:100},20)
  .to(contuneButton,1,{_alpha:100},20)
  .call(trace,['about to pause'],tl,29)
  .call(tl.pause,[],tl,30)
  .to(mc0, 1, {_alpha:0}, 31);
  
	  
contuneButton.onRelease = function()
{
	trace('resuming')
	tl.resume();
}

I have to click the continue button twice to get the timeline going again.

However - If I set up the timeline w/out using frames:

 
var tl = new TimelineMax();
 
It works exactly as expected.
 
Again - this seems to just the happening in AS2 - doing it this way in AS3 works fine.
Any ideas why this is?
Link to comment
Share on other sites

Hi Rob,

 

Just to give you an update, it appears you have stumbled into a little glitch that we need to fix.

 

We'll let you know when we have a fix.

 

In the meantime try 

tl.resume(tl.time()+1);

This will resume playback on the next frame. Hopefully that will hold you over for a bit.

Sorry for the confusion/frustration.

 

Carl

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