Groups | Blog | Home
all groups > flash (macromedia) > january 2007 >

flash (macromedia) : Some advice for full screen


heppell2k
1/23/2007 9:23:04 PM
Ok, don't know if anyone remembers on the old consoles such as the commodore 64
and the Amiga's when a game would load, the screen would be a series of lines
of colours scrolling up and down the screen randomly. No, i want to make my
webpage so that when the page opens... that what you get, no matter what size
the resolution of the users screen. Is there anyway of doing this in flash, and
if so what size should i make it? thanks
I tried
1/23/2007 10:34:42 PM
I'm not sure if this is the preferred method or not, but you could use some
javascript to capture the size of the user's browser window and then resize
your flash object accordingly.

This is the script to capture the height and width in pixels of the user's
open window:

if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = self.pageXOffset;
myHeight = self.pageYOffset;
} else if( document.documentElement && (
document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.scrollLeft;
myHeight = document.documentElement.scrollTop;
} else if( document.body && ( document.body.scrollWidth ||
document.body.scrollHeight ) ) {
//IE 4 compatible
myWidth = document.body.scrollWidth;
myHeight = document.body.scrollHeight;
}

At the end of the function containing this, you would resize your flash
object. If this doesn't make sense, check w3schools site and get some
information on the DOM.
heppell2k
1/24/2007 9:36:24 AM
heppell2k
1/24/2007 9:49:53 AM
Er... ive had a look around that site... and tbh im still a bit if not lost a
lot lol, ive never used javascript so although i cna recognise little things i
cant really see what i want. I want to create a flash movie of the scrolling
lines dont i, then i need to use this javascript to detect user display and
resize iamge appropiatly. Say the image filename was MOVIE.swf then how would i
set that in the javascript
thanks
alokjain_lucky
1/24/2007 11:59:43 AM
In Flash use File > Publish Settings go to HTML tab and change Scale to Exact
Fit

And Publish your Flash File, It will create a HTML page with SWF that fits in
page, no matter what size and resolution of the users screen.


heppell2k
1/24/2007 12:02:45 PM
Many thakns
ill give that a go
AddThis Social Bookmark Button