Javascript/FScommands causing fatal errors in IE 5
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Javascript/FScommands causing fatal errors in IE 5

  1. #1
    Junior Member
    Join Date
    Apr 2000
    Posts
    28

    Question

    I am trying to create a quiz for an educational site I'm working on. The quiz itself is in flash and uses FS commands to report the score to the HTML page. Unfortunately, every time I try it, it causes my browser to crash. I'm still learning javascript, so that could be the problem.

    The name of the movie is "testmovie" and here is the code I am using:

    function testmovie_DoFSCommand(command, args)
    {
    if ( command == "score" )
    document.write(+ args);
    }

    I'm also using some VBscript:

    <!--
    // Catch FS Commands in IE, and pass them to the corresponding JavaScript function.

    Sub testmovie_FSCommand(ByVal command, ByVal args)
    call testmovie_DoFSCommand(command, args)
    end sub

    //-->

    Any ideas? I'd appreciate any help anyone could give. And I apologize if this is a stupid question.

    Thanks, Jaime

  2. #2
    Junior Member
    Join Date
    Mar 2000
    Location
    Seattle, WA
    Posts
    19

    Post

    If you are trying to send FSCommands to your Flash movie before it loads, it will crash your browser...

    Try setting a javascript variable on your html page like:
    flashLoaded = 0;

    Then in your Flash movie do an FSCommand("SetFlashLoaded")

    In your FSCommand section on your html page

    if (command = "SetFlashLoaded")
    flashLoaded = 1;

    Then you html page will know when it can send commands to your flash page...

  3. #3
    Junior Member
    Join Date
    Apr 2000
    Posts
    28

    Talking

    Thanks so much. You are a life saver...

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

Poll by Flashkit.com