anybody know how i can have an image placeholder in my flash video player before the user clicks the play button to load the video?
right now i have just a blank black screen and you can't see anything until the video starts.
anybody know how i can have an image placeholder in my flash video player before the user clicks the play button to load the video?
right now i have just a blank black screen and you can't see anything until the video starts.
put your image in a movieclip
place your movieclip in a layer above the video player
remove the movieclip when you start the video.
makes sense i i have the video embedded on the timeline, but what if i have it set as progressive download? how do i remove the movieclip once the video starts?
what if i have it set as progressive download?
the code depends on which video component you use.
for the FLVPlayback component, make use of the FLVPlayback.PLAYING property -
If you use a NetStream object to stream video through a NetConnection object,PHP Code:var listenerObject:Object = new Object();
listenerObject.stateChange = function(eventObject:Object):Void {
if(eventObject.state == FLVPlayback.PLAYING)
trace(my_FLVPlybk.contentPath + " is now " + FLVPlayback.PLAYING);
// remove the movieclip
}
my_FLVPlybk.addEventListener("stateChange", listenerObject);
make use of the NetStream.onStatus handler.
PHP Code:nsStream.onStatus = function (infoObject){
trace (infoObject.code);
if (infoObject.code == "NetStream.Play.Start"){
// remove movieclip
}
};
oh cool, so i can just drop this in an actions frame? sorry, not good with coding at all.
oops, guess not, because it didnt work. :)
where would i put this code at?
thanks in advance
as i stated - the code depends on which video component you use.
so the question still remains - which video component are you using ?
flv playback component
flv playback component
hth :)PHP Code:/**
For Flash 8 > ActionScript 2
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
my_FLVPlybk.contentPath = "your.flv";
var listenerObject:Object = new Object();
listenerObject.stateChange = function(eventObject:Object):Void {
if(eventObject.state == FLVPlayback.PLAYING)
// remove the movieclip
movieClipInstanceName.swapDepths(10000); // change movieClipInstanceName to the
movieClipInstanceName.removeMovieClip(); // instance name of your clip
}
my_FLVPlybk.addEventListener("stateChange", listenerObject);
also for any other reference to FLVPlayback component, please see -
Help Files > FLVPlayback Component > FLVPlayback class
Hello! If you are using playerdiy.com and SWFObject to embed the flash video player, you can add preloader to your web player with the below code:
Check this Customize Preloader button page for more information.Code:so.addParam('flashvars','playerOpts=preLoader*Arrow.swf*s');