View Full Version : Stretch and distort flash in HTML
03-11-2005, 11:45 AM
I want to embed flash in an HTML page. This flash is like a line, but animated. Our designer has only given us the swf, not the fla file (and I'm not an action script programmer and have no such ambitions either ;)).
The original height of this line is 74px and we now want it to have 5px. Problem is that the width also resizes, keeping ratio of the SWF.
Is there a way in HTML to resize that flash, while distorting the ratio, in such that we get the flash to be 5px in height and still have (ie) 1024 px in width?
I also want to make our site suitable for different resolutions, is there a way to set flash geometry with percentages?
Below is the parameters you can change the height and width of swf file with it!
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=Any WIDTH=560 HEIGHT=60>
<PARAM NAME=movie VALUE="SWFName.swf">
<PARAM NAME=loop VALUE="true">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="SWFName.swf" loop=true quality=high bgcolor=#FFFFFF WIDTH=560 HEIGHT=60 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
03-11-2005, 12:25 PM
Thank you for your quick reaction jeet,
I've tried adjusting the width and the height parameters, but the flash keeps ratio.
If I shrink the height, the width is shrinked automatically. I only want to shrink the height and keep the width as it is.
The easy solution would be to contact your designer and have him/her republish the movie to the specified height and width. You can resize flash movies in an html page to a degree, but as you're quicky learning, the aspect ratio is distorted if you stretch the height or width too much and there is not much that can be done about this short of republishing the movie with flash to the needed size.
03-11-2005, 12:58 PM
I have a better solution (found it).
Flash has a Scale parameter: http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14149
Because I have a coloured line, it does not matter that the movie is distorted, it is what I actually want.
<param name="SCALE" value="ExactFit"> does it for me. Now width and height are respected as I configured.
Note, it worked when I removed the spaces in the possible values.
Glad you figured it out. Nice solution. Maybe it will help others facing similar situations.
Powered by vBulletin™ Version 4.1.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.