1

I have a page which has some flash buttons that I need to locate. The typical way of locating these objects through Firebug (Firepath addon) does not help because they are meant to locate only HTML DOM objects.

What I know after a lot of internet surfing is that the flash objects on a page have some Actionscripts which if exposed, can be handled by javascript. My doubt: How to expose these actionscripts? Is there a way to SEE these actionscripts?

I am using OS: Ubuntu 12.10, Browser: Firefox

Praveen Pandey
  • 658
  • 3
  • 16
  • 32
  • seems like it is not possible: http://stackoverflow.com/questions/2052361/get-externalinterface-definitions-in-javascript – Ivan Chernykh Sep 18 '13 at 09:15

1 Answers1

0

What you have searched is partially true. You can actually launch ActionScript methods from JavaScript, but that requires ability to adapt ActionScript core for that purpose.

In ActionScript code you write:

ExternalInterface.addCallback("myFunction", callMe);

function callMe(name:String):String 
{ 
  return "busy signal"; 
} 

In HTML container that embedds SWF you write:

<script language="JavaScript"> 
    // callResult gets the value "busy signal" 
    var callResult = flashObject.myFunction("my name"); 
</script> 
... 
<object id="flashObject"...> 
    ... 
    <embed name="flashObject".../> 
</object>

Note that is also possible to launch JavaScript code from ActionScript.

References:

http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7cb2.html