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'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.
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
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.
Many thakns ill give that a go
Don't see what you're looking for? Try a search.
|