;

PDA

Click to See Complete Forum and Search --> : Detecting Change in screen resolution


spiderboy
07-08-2008, 04:30 AM
Let me tell you clear scenario:
Suppose,user has resolution = 800x600 and is using my flash application, this is a simple case. Now, if He/She change his/her system's resolution from 800x600 to something else, while Flash application is running then how my Flash application can detect this change in resolution?

Best Regards,
Waqas Dar

Dennis_gull
07-08-2008, 04:52 AM
Im not completely sure but I think this will work:
stage.addEventListener(Event.RESIZE,callSomeFuncti on)

spiderboy
07-08-2008, 07:23 AM
Sorry dear, your solution didn't work:(

Dennis_gull
07-08-2008, 01:25 PM
Im not sure you can dispatch an event if the user change the system resolution but what I said above will dispatch every frame a user will resize the swf window, you can test it like this:
stage.addEventListener(Event.RESIZE,traceSize);

function traceSize(e:Event):void {
trace(stage.stageWidth);
trace(stage.stageHeight);
}