Everything listed under: Actionscript-3.0

  • Flash FLVPlayback Video Player Takes Over Screen When in Full Screen Mode

    The FLVPlayback component in Flash is a nice quick and easy way to get video into a Flash movie.  Whether your work flow calls for compiling the movie directly for web, or you're loading it into a larger AS3 application, using Flash to embed the video in the SWF saves time over pure code options. 

    This is where a strange default behavior happens: when you go into Full Screen Mode the movie takes over the entire screen, and often shows up completely black.  Yikes.  The solution is very easy - you need to change a default value on the FLVPlayback component that does not show in the Component Parameters browser in the Flash UI using actionscript.  It's a 1-line simple setting that you can do in the same frame that your movie is placed on the stage in (for frame actions window select your frame and press F9 or open Actions from the Window menu):

    myFlvPlayBackComponent.fullScreenTakeOver = false;


    n00b note:
    Of course, like any actionscript done in the actions window in Flash for an object on stage, you will need to give your video component an instance name in the properties window in Flash and use that matching name in the code above- I named mine "myFlvPlayBackComponent" and thus am using that name in the code.  Also, it will only work if the code is on the timeline at the same frame or later than where the video component is present on stage.  In other words, if you're video component is placed on stage in Frame 2 and you put the actionscript code in Frame 1, the video will not be found yet and will cause an error.

    Do this and test it - when you send your movie into Full Screen Mode, the movie should not take over the screen anymore.  If it doesn't work, use the Flash Debug Player with your browser to catch any errors that might prevent the code from working properly.