Edge Animate Timeline Control

236 views Asked by At

I am very very new to writing code but I am hoping someone out there could help me out with a couple of functions that I have in my head!

I have made a button in Edge animate and I’d like to add some kind of jQuery or extra code to the actions.

Basically, on my timeline I am getting the animation to play from certain points on different mouse events. On ‘rollover’, it plays and stops halfway. Then on ‘click’ I’ve got it playing from the next ‘label’ but because the mouse is still hovering over the button, the ‘rollover’ function kinda trips up the whole thing and it doesn’t know where to be on the timeline.

I’d like the ‘rollover’ function to disable after the first mouse click. Or ‘not’ play until ‘mouseout’ (after click).

Ideally (as an extra) I’d really like it to just toggle between two states on alternating clicks. So, click 1: play from point (a), click 2: play from point (b), . . . . (a), (b), (a), (b), ad infinitum! And then the whole thing should reset on mouseout!!

That’s probably a lot of work, hey? I would really appreciate any tips or suggestions… somewhere to start from! Thanks muchly.

2

There are 2 answers

0
Jan Godfrey On

A way to do this via the timeline would be to duplicate the button and change the code on it at every label. So the first button has the sym.play("b"); code on it then at b label you have an identical button but with sym.play("c"); on it and so on. You should be able to either place a mouseout on the entire stage or each of the buttons that took you back to the start of the timeline sym.play("a");

0
Edgedudette On

I would use a variable to do thing only when variable is 0. Example in compositionReady:

 var on = 0;    
 sym.$("next").bind('rollover',function(){     
     if (on == 0) {
        // do something
        on = 1;   
      } else {
        // do something else
        on = 0;
      }
 });