Groups | Blog | Home
all groups > flash (macromedia) > june 2006 >

flash (macromedia) : detect resolution problem


.:}x-=V!P=-x{:.
6/7/2006 7:17:51 PM
trace(System.capabilities.screenResolutionX);
Maccar
6/7/2006 9:49:16 PM
Hi all
I am making an autorun flash cd and i want it to play either the 800 x 600
version or the 1204 x 768 version depending on the client's resolution of
the monitor.
my question is there any java script or any other option or program that can
help with this or i have to gave up my idea ;-)

Maccar
6/8/2006 12:00:00 AM
Now i got half of the solution i need to tell flash to play a specified file
if the resolution is for example 1024

can you put it all together for me :)

Thank you in advance


[quoted text, click to view]

.:}x-=V!P=-x{:.
6/8/2006 5:01:21 PM
this is the actionscript you need to put in a new flash document and have your
autorun execute this which will get resolution and load the correct swf


function getResolution() {
var xPixels:Number = System.capabilities.screenResolutionX;
var yPixels:Number = System.capabilities.screenResolutionY;
trace("System Resolution = "+xPixels+"x"+yPixels);
if (xPixels<=800) {
loadMovie("800x600.swf", this);
} else if (xPixels>=1024) {
loadMovie("1024x768.swf", this);
}
}
// call the function
getResolution();
.:}x-=V!P=-x{:.
6/8/2006 5:44:10 PM
Maccar
6/8/2006 8:32:52 PM
I really appreciate your help

It worked as i want exactly :))))) i am so happy thank you
[quoted text, click to view]

KevinCarleo
2/11/2007 3:11:46 PM
Is it possible to display, just say an icon, if the proper resolution is detected in a regular webpage (inside the SWF)?

How about for the minimum Processor, Sound Enabled, etc...

AddThis Social Bookmark Button