View Full Version : Video object depth
03-06-2008, 04:56 PM
I am trying to make a progressive download of a FLV video. I am using NetConnection and NetStream to do that, pretty close to the Flash Help tells me to do. The only difference is that I am not using a Flash Object on the Stage, instead I use the following code:
var videoContainer = new Video()
Why I doing this is because, among other reasons, I am using a background image wich is a loaded image using:
The video is donwloading and playing, I hear the sound of it. But i can't see the image, and i guess it's because the background (BgContainerMC) is on a higher depth then my Video Object (videoContainer).
Is there a way that I can control my Video Object depth like a movieclip? How does Flash interpreter the Video Object? Is there a difference between placing a Video from the library on Stage and creating a Video Object instance with new Video() ?
03-06-2008, 05:24 PM
To be sure, if you comment out the bgcontainer bit, do you see the video?
03-06-2008, 06:44 PM
You got me... I can't see the video even without the background over it. I have seen now that the audio from the FLV plays just with the NetStream.play() method, but the image won't show if the Video Object isan't on Stage. And it seem the code videoContainer = new Video() doesn't put a Video Object on Stage. Still I have:
videoContainer = new Video()
trace (videoContainer) //output: [object Object]
That's pretty confusing... It seems to be a difference between making a Video Object from Library and from ActionScript...
03-06-2008, 06:51 PM
Well if you stick the videoContainer = new Video(), in yet another movie clip holder, you should be able to change the depth of this parent holder clip to a higher depth than the background clip...
Haven't tested it, but maybe worth a try...
03-07-2008, 03:30 AM
Been all day (and night) on this... just figured out that there is a way with actioncsript 3.0, too bad I am using 2.0 and not willing to convert all my script (wich is a lot) to 3.0, not just right now... here is the link on how to do it with AS 3.0
I will have to bypass this by placing a video object inside a movieclip on library and then calling this movieclip with attachMovie(). Will try that tomorrow, hope it works. Just if you curious just as I was (before my keyboard lost some keys due to my stress) I will place some trace debugging I was trying to do to discover what in hell (i.e. Macromedia Development Labs) does the video object we create on library really is... still I remain uncertain...
var videoObject = new Video();
trace("all code video: " + videoObject); [object Object]
trace("library video object: " + videoLibrary); //output _level0.videoLibrary
The video object we create on library with New Video... from the menu is in fact a MovieClip or a Component after all?
03-07-2008, 03:12 PM
Now I discovered th VideoPlayer class, a class wich is used by the FLVPlayback component. I don't want to use the component because it is difficult loading it with script and and don't really want those controls and even want to skin the component just to get them out of if. Going to give this class a shot, still there is little documentation about its methods... I am looking at the VideoPlayer.as file and it seems to be a real big class, wich extends to the MovieClip, wich is what I am looking for. Perhaps it will work.
03-07-2008, 03:40 PM
You can select none for the skin, and the controls are simply omitted...
03-07-2008, 04:41 PM
Didn't know that. Thanks! I am not used to components, but I will give it a try. Still, the VideoPlayer class seems to be quite interesting. I found some good documentation about it on http://www.adobe.com/go/videoplayer. It's a PDF, so you need to be patient for the Acrobat Reader plugin to open.
When I got it all working I post here.
vBulletin® v3.8.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.