Flash: Full Screen Video
June 15th, 2006 by Luis[UPDATE:]
Flash: Full-Screen Mode
Flash full-screen mode and Flash Player Update 3 Beta 1 (build 9.0.60.120)
This is just an attempt to create a full screen Flash Video piece (original video size 360 x 204), trying to keep a decent quality by using Video.smoothing property
You can see the result here: Full Screen FLV.
Actionscript:
- Stage.align = "TL";
- Stage.scaleMode = "noScale";
- Stage.showMenu = false;
- var timeline:MovieClip = this;
- var _minW:Number = 360;
- var _minH:Number = 204;
- var video_container:MovieClip = timeline.attachMovie ('video_container', 'video_container', timeline.getNextHighestDepth ());
- function onResize ()
- {
- var scaleY:Number = Math.round (100 * (Stage.height) / _minH);
- var scaleX:Number = Math.round (100 * (Stage.width) / _minW);
- var scaleFactor:Number = Math.min (scaleY, scaleX);
- if (scaleFactor> 100) video_container._xscale = video_container._yscale = scaleFactor;
- video_container._x = Math.round ((Stage.width / 2) - (video_container._width / 2));
- video_container._y = Math.round ((Stage.height / 2) - (video_container._height / 2));
- }
- var connection_nc:NetConnection = new NetConnection ();
- connection_nc.connect (null);
- var stream_ns:NetStream = new NetStream (connection_nc);
- video_container.my_video.attachVideo (stream_ns);
- video_container.my_video.smoothing = true;
- stream_ns.play ("riding_giants_m480[1].flv");
- Stage.addListener (this);
- onResize ();
You can download the source files here. (The video is not included)
Related Links:
- Full Screen Flash Video - ah yeah, by Stefan (FlashComGuru).


June 16th, 2006 at 9:02 pm
Very nice solution for displaying flv kind-a-fullscreen. I’m still struggeling how to implement fullscreen for flv. If you use _blank, the underlaying flv keeps also loading. If you use as target the same window, you have to implement a back button…
I’m testing the last option. try http://media.cpp.nl/mp2 . If you click emmen-lingen you get a fullscreen button. I have implemented your source now.
June 18th, 2006 at 10:40 am
[…] all the FLV in your system). Realated entries: FLV and Wordpress Flash: FLV resources Flash: Full Screen Video Flash Video category
June 23rd, 2006 at 4:03 pm
Hey, a nice demo! But there’s a problem, I can’t access the source files. I get the error ” The requested URL was not found on this server.”
July 27th, 2006 at 10:41 pm
I tried downloading and opening the fla file in Flash MX 2004 Version 7.0 and I can’t open the .fla file. Can you do a File > Save As and save the .fla file as a “Flash MX Document” instead of a “Flash MX ? Document”?
August 11th, 2006 at 3:39 pm
hey ive been looking everywhere for a piece of code like this, though what i really need is a button that when clicked will put flv at full screen, would happen to you know what actionscript to attach to the button? thanks
September 18th, 2006 at 9:04 pm
Just wanted to say thanks supplying the source files… this is a good solution to fullscreen. I was just streching the swf by publishing it at 100% but this looks alot better.
Thanks!
October 5th, 2006 at 8:46 am
Flash: Full-Screen Mode.
March 8th, 2007 at 9:24 pm
Anyone know why the fla won’t open in flash mx 2004?
May 9th, 2007 at 3:17 pm
[…] « Forest Floor flash video tut http://www.blog.lessrain.com/?p=434 http://www.flashcomguru.com/index.cfm/2006/5/26/fullscreenflashvideo This entry was posted […]
May 19th, 2007 at 3:03 pm
I wish WMP would support FLVs, it would make it all far easier
October 1st, 2007 at 10:32 am
hey
great solution — can flv loop though???
http://byroofs.com/v4.0/index_exp.html
December 3rd, 2007 at 1:48 pm
hi
is there anyway of looping the video without extending the time line please.
Not a developer by the way
Cheers
Johnny
December 6th, 2007 at 6:16 pm
Looping a video:
http://mrdoob.com/blog.php?postid=460
December 9th, 2007 at 10:44 am
What you really need is a yutube like proper fullscreen vid so I got this to work.. http://jaxxrr.110mb.com/other/fs2.html
and heres the sourcecode
http://jaxxrr.110mb.com/other/flash-fullscreen.zip
nothing special really.. one line of script on a button
on (release) {
Stage.displayState = “fullScreen”;
}
BUT you need to have the following parameter set to true
either
…
or
ACFLRunContent( … “allowFullScreen”, “true”, … )
cheers
December 9th, 2007 at 10:47 am
the last code did not display, what I ment was to edit the html file and set the allowFullScreen parameter from false to true and make sure your file is not overwritten when compiling but unchecking html in publish settings
January 4th, 2008 at 9:10 pm
jaxx,
your solution:
on (release) {
Stage.displayState = “fullScreen”;
}
seems to work, but my images and the entire flash movie turn out pixelated. Any solutions for this?
Thanks for all your help!
March 23rd, 2008 at 9:49 am
maybe i put the last comment in the wrong place…
how would you go about making a xml playlist of flv’s to work along with this?
thanks
March 26th, 2008 at 7:28 pm
hey guys,
i just build up my own netstream flv player (first of all just for learning coding). but i have a problem with my fullscreen mode.
you can find the .fla under http://www.mikejungwirth.com/downloads/ff_flvPlayer.zip
if soomeone could help me out. i have the problem that the video is inside its own movieclip. good to attach via as code but the flash is actually greater than the video source is. so, if i click on fullscreen it scales the flash up and not just the video.
thanks for help!
October 9th, 2009 at 5:31 pm
great demo thanks!
any idea how to add content above it in flash, everything seems to sit behind the video?
cheers