I've created a Flash website. However, when I resize the published SWF (or the preview window within Flash) some of the elements get displaced. How can I create a "wrapper" like in Dreamweaver so that the window can be dragged out to any size and all of the components stay together as they were intended?
Here is what I mean:
your exact code depends on what you want. but, for example, if you wanted your header to be centered horizontally and your content to be centered horizontally and vertically, you could use:
// position header
header._x = (Stage.width-header._width)/2;
// position content
content._x = (Stage.width-content._width)/2;
content._y = (Stage.height-content._height)/2;
// and you will probably want to check the stage scaleMode properties.
for some reason when I copy and paste this code my swf gets stuck loading and blinks uncontrollably. what should I do? also, how do I check the stage scaleMode properties? I'm so sorry I don't know Flash well at all!
How would I do that? I tried using this code:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
trace( stage.stageWidth );