-
Filmmaker
How do you have an image placeholder in your video before it 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.
Never take life too seriously. Nobody makes it out alive anyways. Film Portfolio

-
FK'n_dog
put your image in a movieclip
place your movieclip in a layer above the video player
remove the movieclip when you start the video.
-
Filmmaker
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?
Never take life too seriously. Nobody makes it out alive anyways. Film Portfolio

-
FK'n_dog
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 -
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);
If you use a NetStream object to stream video through a NetConnection object,
make use of the NetStream.onStatus handler.
PHP Code:
nsStream.onStatus = function (infoObject){
trace (infoObject.code);
if (infoObject.code == "NetStream.Play.Start"){
// remove movieclip
}
};
-
Filmmaker
oh cool, so i can just drop this in an actions frame? sorry, not good with coding at all.
Never take life too seriously. Nobody makes it out alive anyways. Film Portfolio

-
Filmmaker
oops, guess not, because it didnt work. 
where would i put this code at?
thanks in advance
Never take life too seriously. Nobody makes it out alive anyways. Film Portfolio

-
FK'n_dog
as i stated - the code depends on which video component you use.
so the question still remains - which video component are you using ?
-
Filmmaker
Never take life too seriously. Nobody makes it out alive anyways. Film Portfolio

-
FK'n_dog
flv playback component
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);
hth 
also for any other reference to FLVPlayback component, please see -
Help Files > FLVPlayback Component > FLVPlayback class
-
 Originally Posted by J-Luv
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.
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:
Code:
so.addParam('flashvars','playerOpts=preLoader*Arrow.swf*s');
Check this Customize Preloader button page for more information.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|