Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-15-2005, 04:12 PM   PM User | #1
ehaaron
New to the CF scene

 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ehaaron is an unknown quantity at this point
Exclamation Scaling Flash Movies in HTML

Hi,

I have an html page set up to load a flash movie and scale it to the full size of the window. This is working fine, however, I would like to place a cap on how much the movie may be scaled. i.e., i would like to allow the movie to be scaled down to a small browser window, but prevent it from being scaled up beyond its original 1024x768 pixel dimensions.

Is this possible? How might I accomplish this.

Below is my existing HTML script.

Thanks,
AZ

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>Bates Masi Architects Home</title>
<script language="JavaScript">
window.moveTo(0,0);
var jump;
var i;
i=window.location.href.indexOf("?")+1;
jump=window.location.href.substring(i,255);
//document.write(jump);

function displayflash(jump){

document.write('<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="1000" height="700" hspace="0" vspace="0">');
document.write('<param name="movie" value="batesmasihome.swf?'+jump+'">');
document.write('<param name="quality" value="high">');
document.write('<param name="BGCOLOR" value="#CCCCCC">');
document.write('<embed src="batesmasihome.swf?'+jump+'" width="100%" height="100%" hspace="0" vspace="0" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#CCCCCC"></embed>');
document.write('</object>');
}
</script>
</head>
<body leftmargin="0" topmargin="0" onload="window.focus();"
bgcolor="#CCCCCC" marginheight="0" marginwidth="0">
<table border="0" cellpadding="0" cellspacing="0" height="100%"
width="100%">
<tbody>
<tr>
<td align="center" valign="middle">
<script language="javascript"> displayflash(jump) </script> <br>
</td>
</tr>
</tbody>
</table>
<script language="JavaScript">

self.moveTo(0,0)

self.resizeTo(screen.availWidth,screen.availHeight)

</script>
<script language="JavaScript"> var javascript_version = 1.0;</script>
<script language="JavaScript1.1"> javascript_version = 1.1;</script>
<script language="JavaScript">

var newwin;

function launchwin(winurl,winname,winfeatures)

{
newwin = window.open(winurl,winname,winfeatures);
if(javascript_version > 1.0)
{
setTimeout('newwin.focus();',250);
}
}

</script>
</body>
</html>
ehaaron is offline   Reply With Quote
Old 02-15-2005, 06:12 PM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
maybe u can use an if statement, for example
Code:
<script type="text/javascript">
if(screen.width>=1024){
document.write('theflashcodeusing1024x768 as size of it');
}else{
document.write('theflashcodeusing100%');
}
</script>
_Aerospace_Eng_ is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:31 PM.


Advertisement
Log in to turn off these ads.