Search code examples
htmlflashobjecttagsaspect-ratio

Flash Object - Stretching and Compressing Aspect Ratio


Is there a way to NOT preserve aspect ratio in Flash Object (like preserveAspectRatio="none" in SVG)? I want to stretch and compress swf objects.

In this example "no_idea" means param. I don't know if there is another method...

<object data="flash.swf">
<param name="no_idea" value="none">
</object>

Solution

  • Yes, you can use the scale parameter:

    <param name="scale" value="exactfit" />
    

    Exact fit will make the swf fit in the dimensions of the container, ignoring aspect.

    Other options include:

    1. default - this will scale the swf so it shows everything keeping aspect
    2. noborder - this will scale the swf so it fills the container, cropping content if needed but keeping aspect.
    3. noscale - this leaves it up to the swf to do any resizing

    Keep in mind though, I think the code in the SWF itself has the option to override these settings.

    For a list of all the parameter options, see the documentation