Play / Pause Sequence
- May 21, 2019
- 1 reply
- 3904 views
Hello All,
I know this sounds super simple, but I can't figure out how to create a play / pause function. I want a button that toggles between playing and pausing the animation. This is what I've tried so far and it's not working. I've attached the Chrome Dev tools error. It doesn't like "$scope.view.Home.wdg.pump.svc.play;"
// playPause
// Functionality: stop the sequence if already playing - or play the current step if already stopped
$scope.app.playPause = function() {
console.log('$scope.app.playPause = function()');
if($scope.app.view.Home.wdg.pump.playing)
{
$scope.view.Home.wdg.pump.svc.stop;
console.log('playing was stopped');
}else{
$scope.view.Home.wdg.pump.svc.play;
console.log('playing was started');
}
//app.view["Home"].wdg["pump"].svc.play
}
Any Ideas are appreciated!
Thanks,
Wes

