1 Reply Latest reply on Jul 27, 2007 6:06 PM by Newsgroup_User

    FABridge in a AS file

    CameronI Level 1
      I'm sure there is a way to do this, but I can't find it. I have an action script file that I want to be able to expose some of the methods in it to Javascript. The actionscript functions in my <mx:Application are bieng accessed just fine, from the FABridge. So , if I have an action script file that I need to be able to call from the FABridge how would I do that? In the following code example I can set the label in the application all day long, however I can never seem to be able to call myMethod in FlexBridgeTest class.

      The code I am using is some thing like this.
      var flexApp = FABridge.flash.root();

      Any ideas??

      example code.

      xmlns:mx=" http://www.adobe.com/2006/mxml"
      xmlns="*" layout="absolute"

      <fab:FABridge xmlns:fab="bridge.*" />


      private var flexTest: FlexBridgeTest = new FlexBridgeTest();

      <mx:Label id="lblMyLabel" />


      package test {

      import mx.controls.Alert;
      import bridge.FABridge;

      public class FlexBridgeTest {

      private var faBridge: FABridge = new FABridge();

      public function myMethod():void {