Hi,
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:
http://i1124.photobucket.com/albums/l567/niksavtchenko/2.jpg
http://i1124.photobucket.com/albums/l567/niksavtchenko/1.jpg
Thanks,
Nik
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:
var stageListener:Object={};
stageListener.onResize=function(){
// 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;
}
Stage.addListener(stageListener);
// and you will probably want to check the stage scaleMode properties.
North America
Europe, Middle East and Africa
Asia Pacific