Share Posted November 18, 2014 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 More sharing options...
Share Posted November 18, 2014 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()}; 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now