Nuccah Posted April 14, 2009 Share Posted April 14, 2009 I've been trying to find an answer for this for hours, but haven't had much luck. I have a video that plays on my website. When it ends, there is nothing but a black space (final frame of the video I believe). I'd like for an image to take the place of the video when the video ends (no looping). I just haven't been able to find the right code for it. Any help is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted April 14, 2009 Share Posted April 14, 2009 is the video played in a flash player or what? if so then that's a question of flash, not PHP. Quote Link to comment Share on other sites More sharing options...
Nuccah Posted April 14, 2009 Author Share Posted April 14, 2009 is the video played in a flash player or what? if so then that's a question of flash, not PHP. I imagined there would be some kind of php coding that would allow an image to take the place of the video when it was done playing? If not, then I'll delete the thread Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted April 14, 2009 Share Posted April 14, 2009 with AJAX you probably could. Depends on what is playing the video? Quote Link to comment Share on other sites More sharing options...
chelnov63 Posted April 14, 2009 Share Posted April 14, 2009 Flash has event listeners http://livedocs.adobe.com/flash/mx2004/main_7_2/00001596.html which can trigger a function when the video ends.. and then you can simply show an image over the video... no need to go down the php root... flash also has a clear() function which clears the last shot of the video when it stops: http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary819.html Quote Link to comment Share on other sites More sharing options...
gizmola Posted April 14, 2009 Share Posted April 14, 2009 It really does matter whether or not you are using Flash. I'm going to assume that you are, and you have the source for the flash player. What you can do, is use the flash externalAPI which allows you to call a javascript function. Check this out, and maybe google a bit: http://www.adobe.com/devnet/flash/articles/external_interface_05.html So conceptually, what you need to accomplish this is have a function that does some magic in the location of the video. One option might be to have a background image and you hide the player, or perhaps fool with the z-index of overlapping divs, where your javascript function moves the image to the front. Also in flash you need to have an event listener that fires this code when the video is done. Conceptually, this is possible with flash, but in this case I have never tried to implement this idea, so I'm afraid it's only my best guess in regards to making this work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.