views:

119

answers:

3

i have a swf file of width 1000 and height 700. i want to show the swf file in full screen of the browser it self (not like videos plying full screen).

i tried like the following

1) get user screen width and height using java script using the functions available (screen.availHeight and screen.availWidth) the screen size is available by using the functions but not applying to the flash object

2) tried giving 100% for both height and width in object code that also not working

can any one help me on this please.

Thanks in advance.

+1  A: 

Changing the dimensions on the embed/object HTML should do the trick.

Otherwise, here's some resources:

http://www.kirupa.com/developer/mx2004/fullscreen.htm

http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html

http://www.bezzmedia.com/swfspot/tutorials/flash8/True_Fullscreen_Flash_Mode

Justin Johnson
thank you for the links. those helped me alot but the full screen of flash swf file is only working in html page not working in php page can you give any suggestions. Thankyou.
newbie programmer
Not unless you show me some code
Justin Johnson
hi,Thankyou for quick replayit is working now where can i place the working code to help some others
newbie programmer
+1  A: 

Use swfobject to embed your flash and configure so that it fills 100%. Check first question on the faq here SWFobject faq

goliatone
I tried the swfobject.js but not worked Thankyou.
newbie programmer
A: 

Use this for your html file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
        swfobject.embedSWF("MySwf.swf", "swf_container", "100%", "100%", "10.0.0");
        </script>
    </head>

    <body>
        <div id="swf_container">
        </div>
    </body>
</html>            

And add that swfobject.js file to bin or bin-debug or wherever it needs to go.

All that's really required is that swfobject.embed javascript call, specifying percent sizes and the flash player version.

Hope that helps, Lance

viatropos
You might want (need) to add some html styling to the previous code...html, body { height:100%; }body { margin:0; }
goliatone
this is working only in .html file not in .php can you give any suggetionsThanks.
newbie programmer