video.Maru
by polyGeek polyGeek logo



 

videoWindow

June 24th, 2007 . by polyGeek
polyGeek TV Watch video tutorial on creating a videoWindow and it’s features

The videoWindow is the instance name of the MovieClip you create that will be replaced at runtime to display the video that you have indicated.

In order to tell the videoWindow which video to play you create a dynamic TextField inside the videoWindow and put the path to your FLV, or XML, file in TextField.

The _alpha setting of your videoWindow MovieClip will be applied to your video.

There are four ways to indicate which FLV to play.

1 - by relative path from the swf file that you are working with.

Example: “vids/water.flv”

2 - by using an http address.

Example: “http://polygeek.com/video_tutorials/vids/sea.flv”

3 - by pointing to an XML file that has the necessary data.

Example: “data/videos.xml” or “http://polygeek.com/video_tutorials/vids/videos.xml”

4 - Feature to be reveled soon.

The videoWindow MovieClip gets replaced at runtime with elements inside the SWC. You didn’t actually think a MovieClip could play a video did you? :-)

MovieClips that are placed on the stage at runtime have a higher depth than those at authoring time. (Technically speaking, all objects on the stage at authoring time have large negative depths.) So how would you be able to put something over the videoWindow at authoring time and have it stay there? It’s pretty simple. Just embed the videoWindow inside of another MovieClip. The MovieClip that now holds the vidoeWindow does not need an instance name. Now the graphics that you place over the MovieClip that is holding the videoWindow will stay on top of the videoWindow.

If this seems nonsensical and bewildering then welcome to the world of depth management in Flash. :-)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Technorati
  • del.icio.us
  • Facebook
  • Google
  • StumbleUpon

2 Responses to “videoWindow”

  1. comment number 1 by: Andy

    Hi, I love videomaru it is absolutely superb and saves me heaps of time. I have one request:

    I desperately need two videoWindow on the stage, playing the same FLV, controlled by the same controls - is this possible??
    Thanks

  2. comment number 2 by: polyGeek

    @Andy, yes, this is possible, sort of. You can’t put two players on the Stage but you can put two players in their own MovieClips on the Stage and they will work totally independently of each other. And you can use the API to add controls at the stage level to control both at the same time. So that, for instance, playing one video will automatically pause the other.

Leave a Reply

Name

Mail (never published)

Website