all groups > flash (macromedia) > january 2007 >
You're in the

flash (macromedia)

group:

How do I maintain the size of an individual movie clip within my .swf?


How do I maintain the size of an individual movie clip within my .swf? JohnLeger
1/23/2007 10:47:53 PM
flash (macromedia): I am using a .swf file that I created Flash 8 in my Adobe Flex 2 (which is
AWESOME) application project. I would like my .swf file to resize on the width
but not the height when the browser resizes. So in Adobe Flex 2 I have set the
following properties: maintainAspectRation="false" width="100%" height="209".
This correctly causes the .swf file to fill the width of the browser without
adjusting the height.

The question I have is in Flash 8 how do enable an individual movie clip
within my .swf file to maintain its size regardless of the browser resizing?
In other words, the individual movie clip has a width of 273 and a height of
202 and I want it to maintain these dimensions period. The rest of the .swf
file looks great when it resizes to the width, but the individiual movie clip
with in it does not. Please keep in mind that the height will not change and
should not change on the entire .swf file when resized. In reality I guess I
am asking, how do I maintain the width of 273 pixels on the individual movie
clip when the browser resizes?

Thanks for any suggestions or solutions you may have!

John


Re: How do I maintain the size of an individual movie clip within my .swf? David Stiller
1/24/2007 8:52:11 AM
John,

[quoted text, click to view]

Take a look at the "Stage class" entry of the ActionScript 2.0 Language
Reference. You'll see a Stage.scaleMode property that gives you a few
choices. You might also want to assign an event handler to the
Stage.onResize event that adjusts the dimensions of that one clip as you
please.


David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."

AddThis Social Bookmark Button