A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Detecting Change in screen resolution

  1. #1
    Junior Member
    Join Date
    Jan 2008
    Posts
    8

    Unhappy Detecting Change in screen resolution

    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

  2. #2
    Junior Member
    Join Date
    Mar 2008
    Posts
    19
    Im not completely sure but I think this will work:
    stage.addEventListener(Event.RESIZE,callSomeFuncti on)

  3. #3
    Junior Member
    Join Date
    Jan 2008
    Posts
    8

    Unhappy

    Sorry dear, your solution didn't work

  4. #4
    Junior Member
    Join Date
    Mar 2008
    Posts
    19
    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:
    Code:
    stage.addEventListener(Event.RESIZE,traceSize);
    
    function traceSize(e:Event):void {
    	trace(stage.stageWidth);
    	trace(stage.stageHeight);
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center