PDA

View Full Version : resize on scale window


siphon
03-27-2006, 08:33 PM
I have a flash movie in my HTML file and i want it to scale to the size of the window... but I only want it to go so far...

I want it to be able to scale as low as 1024 x 786 for people that use this setting and I also want it to be able to scale as large as 1280 x 1024. Any idea how the code might look? Because I am clueless.

thank you

Creative Insanity
03-28-2006, 01:41 AM
what about people at 800x600?
Use percentages or a min size of 740px

siphon
03-29-2006, 04:45 PM
i have this code to test the size of the users window:

function redirectbyWidth(){
var smallpage = "http://www.yoursite.com/small";
var mediumpage = "http://www.yoursite.com/medium";
var largepage = "http://www.yoursite.com/large";

if (document.all){
cW=document.body.offsetWidth
if (cW <= 640) {
window.location.href = smallpage;
}
if (cW > 640 && cW <= 800) {
window.location.href = mediumpage;
} else {
window.location.href = largepage;
}
}
else
{
wW=window.outerWidth
if (wW <= 640) {
window.location.href= smallpage;
}
if (wW > 640 && cW <= 800) {
window.location.href= mediumpage;
} else {
window.location.href= largepage;
}
}
}
</script>
</head>

<body onload="redirectbyWidth()">
</body>
</html>


it works in IE but not FireFox.. what is the reason for this ?

domedia
03-29-2006, 04:57 PM
That is because document.all is IE only..

siphon
03-29-2006, 04:58 PM
i have no idea how to fix it.. can you help ?

Creative Insanity
03-29-2006, 05:06 PM
Just don't use that script and setup a control table and set it up at the percentage you want the page at. Go to the front page and look for a VTM called Control Table.

domedia
03-29-2006, 05:17 PM
siphon just set the width of the flash movie to 100% and you should be set.