If you want to completely remove the video, (which will stop video and sound), you can use this (you may have to adjust how you reference the "videoHolder" depending on where you're calling it):
If you don't want to completely remove the video, this should work:
you're help is once again appreciated.
code worked although the other didn't. But you've solved my problem so thanks for that.
Actually sorry it's not working.
Say I'm on the 1st video label and I click back to the main menu, then yes the audio stops playing. When I'm at the 2nd video label (which the video has no audio) the 1st video audio does stop, but when I click to the 3rd video label then back to the 2nd video label the 1st video label audio starts playing again
The button to the main menu has code on itself as an object. But the next and back buttons are controlled from the main timeline code, ie...
main menu button is:
where as the next button is:
Hey pancreas, it sounds like the code does is in fact work to stop the audio and video, right?
But perhaps in your particular setup, you have multiple videos, so you need to target each video for "stopping", depending on which one is active.
1 person found this helpful
Long story short, my code to stop the video works. The issue is that your click events are getting all mixed up. If you put console.logs in each of your click events, you'll see that once you're at the third video, you are actually calling all three click events (they're stacking up, since they're not being removed).
You need to restructure your file. At Stage.compositionReady, add one click listener to each of your buttons. Add a variable to keep track of "currentVideo", and use that variable to control your functionality on click.
Sorry I'm a graphic designer more than a programmer.
Is there any tutorials on how to set listeners up for buttons in the Stage.compositionReady and how to track the "currentVideo" ?
Sorry for my lack of programming skills.
I'm having a similar issue...
a bit of newbee as well..
i have poster... when you click on it... go to another part of the timeline... The video in the videoholder loads up. I have an action script....this works great...
// sym.$("name") resolves an Edge Animate element name to a DOM
// element that can be used with jQuery
var element = sym.$("stealin2");
element.html('<video width="715" height="382" \
type="video/mp4" controls="controls" \
above the videoholder, I created a graphic box with an x for stopping the video.
I create a trigger so the when you click on the X the action goes back start location where the videoholder is gone. Thus, back to the poster. However, the video continues to play. Here's the trigger i use, which works to get rid of the videoholder but not stopping the audio in the video.
// play the timeline from the given position (ms or label)
I've tried a bunch of these solition but no luck..
Here is your revised file. I restructured your project so that all code is at Stage.compositionReady, and the back/next buttons call the code there. This makes debugging much easier, than trying to keep track of code scattered throughout the timeline.
Let me know if you have any Q's.
that works great. Now I just gotta work out how to set it up with 4 categories, ie there's 3 more than just "General".
Where do sym.onClickBack = function() and sym.onClickNext = function() get called cause I might need to do four of them, ie sym.onClickNextGen = function(), etc...
"onClickBack" and "onClickNext" are called by the "click" events of your "btn_genNavBack" and "btn_genNavNext" buttons.
Ah yes, I swear I checked the code on the buttons and saw nothing, oh well I'm a gumby
Thanks for you're patience and effort Tim, you're a champ!
No problem, glad to help!