Jump to content
Search Community

101 using TimelineLite and Adobe Edge

Robbo969 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi,

 

I am having a 101 issue I think, but am following the instructions as best as possible. Ultimately I am trying to create an Adobe Edge animation that completes after a mouse click (using multiple tweens in a TimelineLite function) and then links to a URL. The attached code is a simple test I created after my brain nearly burst trying to create the capability in the full animation. I also replaced the Window.Open with an Alert function for simplicity. All to no avail.

 

The script is attached to the click event of an Adobe Edge animate element (it's a rectangle for completeness), the first alert works, the tween animates and then nothing... The browser console reports '"Javascript error in event handler! Event Type = element"'. Am I missing something in the .call parameters?

 

All help much apreciated. Thanks!

 

function GRsFunction( param1 )
{
alert('from GRsFunction - ' + param1);
}
 
GRsFunction('This is the first call');
 
var tl = new TimelineLite();
 
//append a to() tween
tl.to(sym.$("Rectangle"), 1, {left:450, top:95, scale:0.6, ease:Power2.easeInOut});
 
//then load up our call
t1.call(GRsFunction, ["It's from TimelineLite"]);
 
t1.play();
Link to comment
Share on other sites

Hi Robbo969  :)

 

your timeline name is incorrect , pls fix this : in your code tl is correct , not t1 

 

you can try this way with same result too ;  put this in your project compositionReady , and remove code from element's click scope :

function GRsFunction( param1 ){
alert('from GRsFunction - ' + param1);
}

GRsFunction('This is the first call');

var tl = new TimelineLite({paused:true});
tl.to("#Stage_Rectangle", 1, {left:450, top:95, scale:0.6, ease:Power2.easeInOut})
  .call(GRsFunction, ["It's from TimelineLite"]);

document.getElementById("Stage_Rectangle").onclick=function(){tl.play()};

  • Like 1
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...