Please Help! resize flash if screen resolution is lower than 1024
Grrr...
So the idea is simple, if our visitor’s screen resolution is smaller than 1024, we want to have a flash that resizes, if it’s 1024 or higher, we want to give him our intended size with a noscale.
I have found the following script on line:
Just in front of the javascript embbed of flash, you add:
if(screen.width < 1020)
{
var myScale = 'showall';
}
else
{
var myScale = 'noscale';
}
then within the Adobe’s embed, change the line
’scale’, ‘noscale’, (or whatever else)
to
’scale’, myScale,
but i can't seem to get it working, my opinion is that i use this script in a wrong place?
Last edited by gravitysub0; 10-09-2007 at 05:19 PM.
Hey there, I have done something like this before.
I havent checked this code:
PHP Code:
// javascript function
function getDim()
{
if ((screen.width < 1024) || (screen.height < 768))
{
return document.write('mySmallerScaleHere');
}
else
{
// you may just be able to return the size instead of using document.write
// return ('my1024ScaleHere');
return document.write('my1024ScaleHere');
}
}