I have a project with a bunch of Videoclips.
I control them with a play and pause button
I also have another button that close down the video.
The Pause Button:
The Play Button:
The Close Button:
The prpoblem with this scripts are that the Close button just pause the video and hide the layer.
When I then open another video and press play two videos will play. The new one and the one that I closed(hide and paused) by clicking the close button.
So is there a way to disable/close a layer to avoid this problem?
Your script is playing and pausing 2 videos at once. get a reference to each like so:
var vid_1 = document.getElementsByTagName("video")
var vid_2 = document.getElementsByTagName("video")
Then you'd pause/play a specific video:
This might work.
where captivateObjectName is the name you give it in the Captivate properties window.
You can also use jQuery to select the object, like you are doing in your example. just put it inside the parenthesis.
Thank for all the replies.
But wont all this just do the exact same thing. Hide the video object but then when I press play again captivate will play all videos that have once been loaded but hide. If you understand 🙂
I never get in the way of JS experts, although often they seem to like to complicate workflows unnecessarily in my mind.
Are you aware of the fact that you can have event videos (not slide video) in states of a multistate object? You would never have all videos play at once, since you can show only one state.