A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: display different pages depending on screen size

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Location
    Brighton,UK
    Posts
    249

    display different pages depending on screen size

    i have two different web pages one is designed for an 800x600 screen, then i what people with using 1280x1024 and above to see another version. can any body point me the direction of a javascipt script that will do that for me

    i have had a little go myself but could not get it to work its driving me crazy!

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You could use a simple Flash base movie, sniffing out the user's resolution (System.capabilities), and then simply load the appropriate .swf according to the sniffer results, replacing the sniffer movie itself.

  3. #3
    Senior Member
    Join Date
    Jul 2003
    Location
    Brighton,UK
    Posts
    249
    like it! that way i don't have to mess about java script!

    thanks

  4. #4
    Senior Member
    Join Date
    Jul 2003
    Location
    Brighton,UK
    Posts
    249
    i can't seem to get it to work

    when i trace out:
    System.capabilities.screenResolution.x
    all get is:
    undefined

    ?

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Are you testing from an html, or from the application itself?

  6. #6
    Senior Member
    Join Date
    Jul 2003
    Location
    Brighton,UK
    Posts
    249
    no in a browser on MAC and PC

    i have attached my fla it has a text box where the values are put

    System.capabilities.version works?
    Attached Files Attached Files

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Is this a Mac .fla?
    If so, can't open it on a PC if it's not zipped up!
    In my case it should also be in a MX only format not MX2004.

  8. #8
    Senior Member
    Join Date
    Jul 2003
    Location
    Brighton,UK
    Posts
    249
    it is a mac file but it is MX i have never uesd MX2004

    are we missing much?
    Attached Files Attached Files

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yeah! An error in documentation...

    The actual code...

    myText.text = "x " + System.capabilities.screenResolutionX;
    myText.text += newline + "y " + System.capabilities.screenResolutionY;

  10. #10
    Senior Member
    Join Date
    Jul 2003
    Location
    Brighton,UK
    Posts
    249
    thats unreal!

    i googled it and eveywhere is wrote as "System.capabilities.screenResolution.x"

    thaks for your help

    kev

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