1 person found this helpful
A simple example animating just the width of an element; play (green)/pause(red) elements.
You were pretty close with your code:
- you did't close out your methods with ()
- substitute timelinePos with simply sym.play(); or sym.stop() depending on the button pushed
- plus you would need to sym.$("pause-icon").hide(); to hide on the start;
So complete Stage > Compositionready code would look like this
Download sample file: http://www.heathrowe.com/edge/pause-stop/pause-stop.zip
Heathrowe, thanks for the code and explanation but I'm having difficulty implementing your solution. I'm new to Edge, so please bear with me.
First, how does the Playback <div> not appear on the timeline? The only thing in the timeline is the rectangle. If I copy and past the Playback <div> to my animation, it appears on the timeline, along with its contained play-icon/pause_icons.
Second, I've copied your compositionReady code, imported the two scripts (jquery-1.7.1.min.js and jquery-2.0.3.min.js) and added a stop to the beginning and end.
The buttons appear and toggle back and forth but the animation never starts... What am I missing?
Thanks in advance, matt