Andree
Andree

Reputation: 3103

How to resize a flash animation to fit HTML container?

I have a flash animation with the size of 1280x1024 and I want to embed it into an HTML file. I want the flash file to be displayed in 800x600. This is my code:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<body align="center">
  <object>
    <param name="movie" value="/flash/connect.swf" />
    <embed src="/flash/connect.swf" width="800" height="600"></embed>
  </object>
</body>
</html>

Well, it doesn't work. I do have a 800x600 frame, but the flash file itself still displayed on its original size. Can someone tell me what have I done wrong here?

Thanks, Andree

Upvotes: 0

Views: 3034

Answers (3)

mwrf
mwrf

Reputation: 3846

(a) Add this

<param name="scale" value="default">

as a flash parameter.

(b) Set the width and height of the object to be 100%.

The flash will then scale correctly in its container.

Upvotes: 0

markcial
markcial

Reputation: 9323

You have to set inside as precompiled code the parameters stage.align = "left" stage.scale = "noscale" and compile it to preserve dimensions

Upvotes: 1

Dercs&#225;r
Dercs&#225;r

Reputation: 1694

AFAIK, Flash objects cannot be resized run-time. They can only be re-authored. Someone correct or confirm me.

Upvotes: 0

Related Questions