HOW GO TO FULL SCREEN?  
Author Message
episthmon





PostPosted: 2005-11-11 21:07:09 Top

flash-actionscript, HOW GO TO FULL SCREEN? I have a movie in flash and i want if someone knows to tell me what action
script i have to put in first frame to play my movie in full screen and also
what what action script i have to put in a button to go back to normal mode?


thanx....

 
NSurveyor





PostPosted: 2005-11-11 21:25:00 Top

flash-actionscript >> HOW GO TO FULL SCREEN? Look up fscommand. I believe it's something like:

fscommand("fullscreen",true); // to enter fullscreen
fscommand("fullscreen",false); //to exit full screen

Also, I think you have to expot as a projector file in order for it to work.

 
David Stiller





PostPosted: 2005-11-11 21:47:00 Top

flash-actionscript >> HOW GO TO FULL SCREEN? >> I have a movie in flash and i want if someone knows to tell
>> me what action script i have to put in first frame to play my
>> movie in full screen and also what what action script i have
>> to put in a button to go back to normal mode?

> fscommand("fullscreen",true); // to enter fullscreen
> fscommand("fullscreen",false); //to exit full screen
>
> Also, I think you have to expot as a projector file in order
> for it to work.

That's right. This is a Projector-only solution. To the OP: you
didn't mention if you needed this to happen in a browser (on a website) or
not. Which is it?


David
stiller (at) quip (dot) net
"Luck is the residue of good design."


 
 
kko_k





PostPosted: 2005-11-12 13:04:00 Top

flash-actionscript >> HOW GO TO FULL SCREEN? Hey, yeah, I want to ask basically the same thing.
I've got a swf that's around 1000x 600. When it gets embedded onto html, I
want the width of it to match the width of the browser. How can i do this??

changing the "publish" html width to 100% instead of 1000 doens't fix it .
And fscommand fullscreen is kinda different...

 
 
myIP





PostPosted: 2005-11-13 2:34:00 Top

flash-actionscript >> HOW GO TO FULL SCREEN? kko_k, this is for Flash 8 only. Put the following in the first frame:

stage_mc._width = System.capabilities.screenResolutionX;
stage_mc._height = System.capabilities.screenResolutionY;

stage_mc is a movieclip(a square, with no stroke) acting like a background.
Then CRTL+SHIFT+F12 to bring up the HTML publish settings. Set the following:

Dimensions: Percent
Width: 100
Height: 100

Window Mode: Transparent Windowless
HTML alignment: Top
Scale: No scale

Flash alignment: center,center

Also I noticed in IE 6.0 that it has margins in the HTML. So just replace the
<BODY> with the following to get rid of them:

<BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"
BGCOLOR="#FFFFFF">

 
 
kko_k





PostPosted: 2005-11-13 16:00:00 Top

flash-actionscript >> HOW GO TO FULL SCREEN? Thanks myIP,

but what if I'm using MX, not flash 8?
How do i make the whole movie scale then?
 
 
myIP





PostPosted: 2005-11-14 10:25:00 Top

flash-actionscript >> HOW GO TO FULL SCREEN? If the fscommand( ) doesn?t work for you then look into the Stage Class.

http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part_ASLR.html
 
 
David Stiller





PostPosted: 2005-11-14 23:14:00 Top

flash-actionscript >> HOW GO TO FULL SCREEN? The water is starting to get muddied, here.

> kko_k, this is for Flash 8 only. Put the following in the first
> frame:
>
> stage_mc._width = System.capabilities.screenResolutionX;
> stage_mc._height = System.capabilities.screenResolutionY;

Obviously, in the above example, there must be a movie clip present
whose instance name is stage_mc. This shouldn't be confused with the Stage
itself (which has no instance name and cannot). MovieClip._width and
MovieClip._height have been available since Flash 4. The
System.capabilities object has been available since Flash 6.

While this should, in theory, set a given movie clip -- and even the
_root -- to the width and height of the Screen, it isn't the standard way to
go about it.

> Also I noticed in IE 6.0 that it has margins in the HTML. So
> just replace the <BODY> with the following to get rid of them:
>
> <BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0"
> MARGINHEIGHT="0" BGCOLOR="#FFFFFF">

All browsers -- at least, that I know of -- carry with them a default
margin/padding for the page. If you want a full screen SWF to override
those margins (to show to the edge of the browser's viewport), the above
line will do it. Keep in mind, however, IE's leftmargin (etc.) attributes
are proprietary: they are not part of the HTML specification. I would
recommend CSS to specify page-wide margin and padding with the following,
which you would put into the <head> element:

<style>
html, body {
margin: 0;
padding: 0;
overflow: hidden;
height: 100%;
}
</style>

This takes care of your margin and padding, and will hide the
unnecessary scrollbar that shows up under some circumstances. The fourth
line specifies the desired interpretation of 100% height as applied to
<object> and <embed> elements for the SWF.

> If the fscommand( ) doesn?t work for you then look into the
> Stage Class.

fscommand() only works for Projectors. This is stated in the
documentation. The Stage class may be used to "listen" for resizing as it
occurs, but will not *set* width and height.

Just make sure your HTML <object> and <embed> elements state 100% for
width and height.


David
stiller (at) quip (dot) net
"Luck is the residue of good design."


 
 
NSurveyor





PostPosted: 2005-11-15 8:42:00 Top

flash-actionscript >> HOW GO TO FULL SCREEN? Also, it's good to set the Stage.align and Stage.scaleMode when you set the width and height to 100% so you can get it to show up the way you want.
 
 
myIP





PostPosted: 2005-11-15 9:00:00 Top

flash-actionscript >> HOW GO TO FULL SCREEN? ?While this should, in theory, set a given movie clip -- and even the
_root -- to the width and height of the Screen, it isn't the standard way to
go about it.? -David Stiller

True, but I just posted that snippet of code from my current project which I
am using a radial gradient movieClip(stage_mc) acting as a background, which is
not achievable use HTML.