views:

59

answers:

1

Hi,

Screen class in actionscript provides the latest total screen bounds and available screen bound, but doesn't allow to attach listener to listen for changes on runtime.

is there any way of detecting screen resolution changes on runtime, it is required to size the application whenever screen resolution is changed. e.g. in case when machine display is connected to projector/high resolution monitor and then switched back to normal.

thanks,

+1  A: 

There are several solutions:

  • If your window is maximized, you can listen to any of various RESIZE events (see you comp. events list)
  • You can create invisible maximized window and listen to it's resize event
  • You can check screen resolution on timer (e.g. every 1 second). It will not decrease the performance.
Maxim Kachurovskiy
i think, i should do this with a timer. because i think resize events will not be fired if user has resized app to a relatively small size and then screen is switched? not 100% sure about this, going to try.
sfaiz