dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: How do I get the screen resolution with Flash?

  1. #1
    Member
    Join Date
    Jan 2008
    Posts
    59

    How do I get the screen resolution with Flash?

    I have made 2 versions of my website, 1 for 800x600 and the other for 1024x768.
    So, I have an intro page where there will be a link in the SWF saying "Enter site" (obviously).
    So,
    1. How do I make a link in an SWF?
    2. I want the link to open main1.htm in the existing whole window if the resolution is 800x600 (or basically just not 1024x768)
    and, the link should open main2.htm in the exsting whole window if the screen resolution is 1024x768.

    Could anyone post a step by step way to do the same??
    ..:: J-Will ::..
    --- The Point GOD ---

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    have a look at -
    ActionScript classes > capabilities (System.capabilities)

    resx = System.capabilities.screenResolutionX;
    resy = System.capabilities.screenResolutionY;

    perform a simple if/else on the results

  3. #3
    Member
    Join Date
    Jan 2008
    Posts
    59
    Quote Originally Posted by a_modified_dog
    have a look at -
    ActionScript classes > capabilities (System.capabilities)

    resx = System.capabilities.screenResolutionX;
    resy = System.capabilities.screenResolutionY;

    perform a simple if/else on the results
    thank you a_modified_dog
    could you please tell me how to make a link in ActionScript (which links to the respective pages)
    ..:: J-Will ::..
    --- The Point GOD ---

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    add a button to stage
    give it an instance name - link1
    add code to the main timeline (same frame as button)

    link1.onRelease = function(){
    getURL("some.html");
    };


    upload and test online (new Flash security model requirement)

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