Copy link to clipboard
Copied
hi, i want to know the size of the window where the flash presentation is running (intended for use in air app).
i tried this:
trace(this.width);
trace(stage.width);
both print 0 as output
tnx
__edit__
i just tried:
trace(stage.fullScreenWidth); also outputs 0 (first i tried Stage instead of stage and it output an error)
The Stage class has stageWidth and stageHeight properties
Copy link to clipboard
Copied
The Stage class has stageWidth and stageHeight properties
Copy link to clipboard
Copied
yup, this time it came something different than 0. quick question, if i make my movie say 640*480, tell it to stretch, and run it in a screen of 800*600 what would come as output, 640 or 800?
--edit--
i just tried this: made two frames, in the first one i told it to stop. then while it was on stop i changed window size and in the next frame i told it to trace width. it traced new size
Copy link to clipboard
Copied
tnx, but the last part was related to current size, rather than height and width. i checked the docs and found that it is related with current size according to scale method, and that there is an event in the case of size change. as the thing i have in mind is related with cell phones and those may have different screen sizes, i choose to scale according to the size of the screen (i used that in actionscript 1, but i did not remember any of that)
Find more inspiration, events, and resources on the new Adobe Community
Explore Now