use a stage onresize listener to control the size of your flash display
In addition to my original post, I took the advice to use the onResize listener, but am running into several issues described below the following code:
Stage.align = "TL"; //doesn't work; why?
Stage.scaleMode = "noScale";
var stageListener:Object = new Object();
stageListener.onResize = function():Void
if(Stage.width < 1024.0 || Stage.height < 768.0)
trace("The movie should be scaling");
Stage.scaleMode = "scale";
trace("The movie should not be scaling");
Stage.scaleMode = "noScale"; //doesn't work; why?
The above code works partially, but then stops, i.e. when I press CTRL + ENT to test the SWF:
- The first line of code does not recognize that I want to top-center the SWF.
- If I resize the SWF I get the correct messages traced initially, but the SWF continues to scale if the stage is > 1024x768.
- What should my HTML publish settings in Flash be for this code to work properly? Should this code override the HTML publish settings? If so, it doesn't. In other words, the SWF doesn't scale at all when launched in the published HTML file, but the stand-alone SWF file does scale. I would have to modify the HTML source code for the SWF to scale, so it seems that there is a disconnect between the AS2 code and the published HTML file.
Thanks for any help you can offer.
click file/publish settings/html and select percent, 100 x 100. retest.