public function getTextId():String
{
return val;
}
ExternalInterface.addCallback("getId", getTextId);
I am getting the following error:
Access of undefined property getTextId. ExternalInterface.addCallback("getId", getTextId);
But I have getTextId defined and all the tutorials indicate this is the correct method to do it.
Is your call to ExternalInterface.addCallback() inside of a method, or are you calling it a the "class level" (for lack of a better term), as shown in your code snippet?
I just tried adding the callback outside of a method, it worked... not surprised but I rarely code that way. However, I added second method as a callback, and got the same error as you at compile time.
Strange that it works for one method but not the other (no matter what I seem to try).
Have you tried moving the addCallback line into a function or the constructor? This fixes the error for me.