A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Detecting screen resolution & loading movies LAST

  1. #1
    Junior Member
    Join Date
    Jun 2000

    I have 2 questions about some programming in Flash:

    1) How do I tell a web page to wait for the images on the page to load FIRST, before the flash movie starts to play?

    2) How do I detect which resolution the user is at, and then based on that info re-direct them to a specified URL?


  2. #2
    Junior Member
    Join Date
    Feb 2000
    Dan the cow as an icon. cool idea!!

    But to get back to the subject,
    i can answer your second question about rederecting.
    but your first is kinda tricky i guess. Maybe its possible but i dont know how its gonna be done. It seems quite impossible to me though.

    ================================================== ========
    to detect which screen res somebody is using youll have to make a new html page, a detecting screen. I prefer black detecting screens with no pictures and stuff. You just see that screen for a sec or some, so....

    Then you have to open the source code and put some javascript code in there to detect the resolution.
    You can find all sorts of (javascript) codes at http://www.dynamicdrive.com

    I have fetched a code for you.. here comes:

  3. #3
    Junior Member
    Join Date
    Feb 2000


    <script language="JavaScript1.2">

    Screen resolution detection and notification Script-
    Dynamic Drive (www.dynamicdrive.com)
    For full source code, installation instructions,
    100's more DHTML scripts, and Terms Of
    Use, visit dynamicdrive.com

    var correctwidth=800
    var correctheight=600
    if (screen.width!=correctwidth||screen.height!=correc theight)
    document.write("This webpage is bested viewed with screen resolution "+correctwidth+"*"+correctheight+". Your current resolution is "+screen.width+"*"+screen.height+". If possible, please change the resolution!")

  4. #4
    Junior Member
    Join Date
    Feb 2000


    Now, that piece of code only detects what kind of res you are watching and tells it to ya. But you want more. You want the browser to redirect.
    Ill just search some more for ya.. hold on.

  5. #5
    Junior Member
    Join Date
    Feb 2000


    now its a red car!!
    Those icons rock man!!!!!!

    btw, this script is one i made by myself, i just took some detecting and redirecting scripts from that site and made some'n myself. Hope it works. otherwise somebody else will help you. But please try this code.
    ================================================== =====

    function show(){
    if (!document.all&&!document.layers)
    var width=screen.width
    var height=screen.height

    if (width==800)
    window.location.replace("http://PUT URL FOR 800*600 HERE")

    else if (width==1024)
    window.location.replace("http://PUT URL FOR 1024*768 HERE")

    window.location="http://PUT URL FOR LOWER RES. HERE"

    ================================================== ===

    hope it works man, please tell about your site on this board when its finished!


  6. #6
    Junior Member
    Join Date
    Jun 2000
    to make a loader
    you put in the first frame the action:

    if frame is loaded "name_of_label_of_movie"
    goto en play "name_of_label_of_movie"
    end frame loaded

    and in frame 5 or somthing like that you put

    goto and play "name_af_loding_label"

  7. #7
    Beyond the Sea
    Join Date
    Mar 2000


    I believe we encountered your first question before. How we handled it was to have javascript control the flash movie.

    Put a stop action on the first frame of your movie. Make sure there is nothing else in that first frame but background color. Then, put the onLoad() javascript command at the end of your html. You'll have to create a function that wille execute when that command is triggered. You want that command to tell the flash movie to play after everything else is loaded. Then, you can have the flash movie go to a preloader or, if it has finished downloading (which you can also check with javascript), have the movie start right up.

    I'm not really sure of the specifics, but that's how we got around it. If you need something more specific (which you probably will) I can ask the technologists at work what they did.

    hope this helps,

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