-
1. Re: Edge Animate Play/Pause Issue
heathrowe Jan 10, 2014 11:38 AM (in response to JNIrving)A simple example animating just the width of an element; play (green)/pause(red) elements.
http://www.heathrowe.com/edge/pause-stop/
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
sym.$("pause-icon").hide();
sym.$("play-icon").click(function(){
sym.play();
$(this).hide();
sym.$("pause-icon").show();
});sym.$("pause-icon").click(function(){
sym.stop();
$(this).hide();
sym.$("play-icon").show();
});Download sample file: http://www.heathrowe.com/edge/pause-stop/pause-stop.zip
hth
Darrell
-
2. Re: Edge Animate Play/Pause Issue
LuckyNotLucky Dec 2, 2014 12:47 PM (in response to heathrowe)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


