Hi all, I'm facing a weird problem. I'm using ExternalInterface.addCallback for interaction between Javascript and my flex application. When I compile this '.as' file in my Eclipse environment, everything works fine and when I deploy it also, things work fine and I can call my actionscript methods from javascript. But when I try to create an 'swc' file out of this '.as' file from command prompt, I get the following error:
C:\temp\output\flexsrc\com\test\MyTest.as(10): col: 20 Error: Call to a possibly undefined method addCallBack through a reference with static type Class. ExternalInterface.addCallBack("myMethod", TestClass.testMethod); Here's the command I'm using to create the swc file: "%FLEX_HOME%\bin\compc" -source-path+=%SRCPATH%\output\flexsrc -output=%SRCPATH%\output\MyTest.swc -compiler.debug -include-classes com.test.MyTest Flex home is pointing to the right directory. I also have the method 'call' being referenced from ExternalInterface in the same class and that goes through fine without throwing any errors: ExternalInterface.call("showName", sysName); Any idea why the call for ExternalInterface.addCallBack is not compiling?