tags:

views:

29

answers:

2

Hi guys... I just built a flex applcation with AS3 only.. the generated swf will expand as much as browser's window..I wish to reduce the dimension of swf file...any ideas?? Thanks..

+1  A: 

You may need to specify your swf dimensions eg:

[SWF(width="640", height="480")]

If you're viewing it directly in your browser, you should embed your swf inside an html document and specify the dimensions of your swf. If this is for a public facing website, I'd recommend using SwfObject.js. Or if you aren't comfortable with Javascript you can use the object tag:

  <object width="640" height="480">
    <param name="movie" value="your_file.swf">
    <embed id="embed" src="your_file.swf" width="640" height="480"></embed>
  </object>
jdeseno
your object tag is not working in my case...swf still expand as much as it can...and [SWF(width="640", height="480")] won't scale the swf file...all I need is 1.3 scaleX and scaleY on swf +1 though
Jerry
Fixed the embed tag to something that should work.
jdeseno
Thanks..SwfObject.js saved me life.....
Jerry
A: 

I would suggest using SWFObject for embedding the generated SWF file and then changing the dimensions through the parameters.

http://code.google.com/p/swfobject/

Abhinav