A Flash Developer Resource Site

Results 1 to 20 of 20

Thread: JAVASCRIPT running flash button

Hybrid View

  1. #1
    Senior Member
    Join Date
    Aug 2009
    Posts
    113
    ah i got it. it's the other way to call javascript. thanks!

  2. #2
    Senior Member
    Join Date
    Aug 2009
    Posts
    113
    did I miss something?

    PHP Code:
    import flash.external.*;

    var 
    methodName:String "sendTextFromHtml";
    var 
    instance:Object null;
    var 
    method:Function = receiveTextFromHtml;
    var 
    wasSuccessful:Boolean ExternalInterface.addCallback(methodNameinstancemethod)

    function 
    receiveTextFromHtml(key) {
        if (
    key.text == F2) {
        
    ExternalInterface.call("listen(2)","_self");
        }
        else if (
    key.text == Enter) {
        
    ExternalInterface.call("check(1)","_self");
        }
    };

    ExternalInterface.call("receiveTextFromFlash"myListener); 
    The programmer will give a shortcut key to the text Enter, F2, F3, etc..

    myListener is the instance name of the flash button
    Last edited by ayusuits; 11-03-2009 at 09:53 PM.

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