dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: ExternalInterface.call

  1. #1
    Junior Member
    Join Date
    Oct 2005
    Location
    San Diego
    Posts
    6

    ExternalInterface.call

    I am hoping someone can offer some advice on this. Sorry to ask this basic of a question but there is absolutely no one locally I can ask and I am trying to learn the hard way (no advise or assistance).

    I am trying to send a JavaScript command (JavaScript:returnClientValue('QuizInfoURL')) to a php page ( classdev.pyxis.com/scripts/courseGetQuizDetails.php) using the ExternalInterface.call

    I am also trying to assign anything received back from the php page to the variable (testStr).

    I have a book (ActionScript 2.0 Garage) that I am referencing and it says that this should work.

    Here is the code I am using:
    ---------------------------
    on(release){
    var testStr:String = ExternalInterface.call("classdev.pyxis.com/scripts/courseGetQuizDetails.php","JavaScript:returnClient Value('QuizInfoURL')")
    ExternalInterface.call("classdev.pyxis.com/scripts/courseGetQuizDetails.php","JavaScript:returnClient Value('QuizInfoURL')")

    }

    ----------------------------

    Any help will go a long way.

    Thanks

  2. #2
    Not Real since 1985
    Join Date
    Feb 2002
    Location
    Netherlands
    Posts
    229
    I would first try it in two steps:
    in fla:
    ExternalInterface.call("jsFunc", parms);

    in html:
    function jsFunc(str) {
    // your function which calls your php page with this parms.
    }

    This way you can test as and js independent and see if there are any problems with the sandboxes (safety rules).
    Never accept the first 'impossible' unless it comes from a lady.

  3. #3
    Junior Member
    Join Date
    Oct 2005
    Location
    San Diego
    Posts
    6
    Thanks I will give that a try.

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