16 Nov 2011 9:08 PM #1
End of Movie Transition
How can i initiate a transition to another scene when ever a video ends playing? is there a way to catch that?
17 Nov 2011 9:31 AM #2
I haven't tried this myself, but this might work:
You can set a start action for the scene with the video to custom js.
Give the video a css id (e.g. "funVideo")
then you can do something like this in for the start action js
//not tested code var video = document.querySelector("#funVideo video"); //psudo code if we haven't set up the listener before attach event listener for "ended" to the video element callback function: controller.goToNextScene();
17 Nov 2011 3:00 PM #3
I do have a problem with the video Auto play, once i select the auto play on the video it start from the beginning of the site even though the video is the last scene. How can i target the video play through code? same approach as targeting the end? does it need a listener?
17 Nov 2011 3:17 PM #4
Again, this is untested, but here is my best guess.
Turn off auto play.
In the custom js start action I talked about in my previous post, you could do something like this:
var video = ... //same as previous code video.play();
17 Nov 2011 4:14 PM #5
20 Nov 2011 7:08 PM #6
Adding the event listener is giving me an "'undefined' is not a function" error! any idea how to solve this.
actually the querySelector gives a NULL when adding the event listener, and getElement gives an UNDEFINED!
21 Nov 2011 10:10 AM #7
21 Nov 2011 2:21 PM #8
Hi ArneThanks for the help, the video worked last night, i tested the same approach on the audio first and when it didn't work i thought the same holds true for the video, but the video part worked.question, do you offer and paid support options for Sencha Animate?
21 Nov 2011 2:24 PM #9
No, we don't offer regular paid support at this point. However, we try to respond to forum questions.
21 Nov 2011 2:28 PM #10
I understand, problem for us is that we're at the other part of the earth (Australia) and the time differento get a responce is not on our favor. Thanks