| | |
Scaling Flash Movies in HTML
Please support our Graphics and Multimedia advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2005
Posts: 1
Reputation:
Solved Threads: 0
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="clsid
27CDB6E-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>
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="clsid
27CDB6E-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>
I dont think this is possible but what you could do is this;
Create a new HTML file set the top and left margins to 0
Place a Layer onto the page set it at 95% Width, 100% Height
From the left 2.5%
Place the SWF file into the layer and set the Width to 100%
The height will auto set according to the Width.
So what you are left with is a SWF file that resizes to the size of the current browser size.
You don't have to put it into a Layer but to get the best results this is best ;-)
See Zip Attached for an example
:cheesy:
I hope this has helped.
Kev
Create a new HTML file set the top and left margins to 0
Place a Layer onto the page set it at 95% Width, 100% Height
From the left 2.5%
Place the SWF file into the layer and set the Width to 100%
The height will auto set according to the Width.
So what you are left with is a SWF file that resizes to the size of the current browser size.
You don't have to put it into a Layer but to get the best results this is best ;-)
See Zip Attached for an example
:cheesy:
I hope this has helped.
Kev
![]() |
Similar Threads
- Inserting (large) flash banner in HTML page (HTML and CSS)
- Rotating flash movies per page load (HTML and CSS)
- how to open/run flash movies from c++ (C++)
- flash movies (Java)
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: I need help getting my mixsets to play...
- Next Thread: Paint shop Pro 7
| Thread Tools | Search this Thread |
3d 10 actionscript3 adobe adobeacrobat adobereader air ajax amazon amf apple button cart childprotection cloud dashboard dell design dojofoundation dreamweaver ebay eclipse ecommerce elasticcomputecloud embed endorsement extra family flash flash-develop flashlite flex free harddrive iamthwee ibm illustrator imflash intel interactivemap javafx javascript laptop legal map micron microsoft mobile monitoringsoftware moonlight multimedia myspace nand news novell panorama pdf pedophiles photoshop photosynth php safety sandisk security shopping silverlight solidstatedrive sproutcore ssd streaming swf table ukmap unload unwanted video vulnerability web white.space xml zend zephyr zeroday





