Groups | Blog | Home
all groups > flash actionscript > september 2007 >

flash actionscript : Best Method for Strechable .swf file in horizontal but not vertical?



neilcowley
9/5/2007 7:09:13 PM
What is the best method to create an easy to use flash file that will allow
horizontal scaling with a fixed vertical size?

This will be for a blog header in a variable width design at
http://makelightreal.com

I have tried the basic stage properties and found
[b]StageScaleMode.NO_BORDER[/b] to be an ok solution, but I'm not sure what
will happen when I begin to drop active clips in on the stage. Will the stage
operate from a fixed point or how will the clips orient to the stage as it
expands?

My understanding of actionscript is just enough to hack pieces of what I need
together: but if you could enlighten me with the most basic understanding of
which method would work best for me I'd apprecate it. I also have this method
to alter the background (as a clip):
[Q]Stage.addListener(ecout);
// function which replaces all the elements with the new values
slide = function () {
photo_mc._x = 0;
photo_mc._y = 0;
photo_mc._width = Stage.width;
photo_mc._height = Stage.width/rapp;
if (photo_mc._height<Stage.height) {
photo_mc._height = Stage.height;
photo_mc._width = Stage.height*rapp;
}
};
slide()[/Q]

Should I just alter the variables there to lock the stage height?

Thanks for your time in answering.
Gorka Ludlow
9/5/2007 8:18:49 PM
When you export your movie you can select the scaling options for width and height.
Try selecting one but not the other.

Cheers,
Gorka
AddThis Social Bookmark Button