I have an AS3 class with some getVideo function. I want to use this function in mxml. So I am creating object there and trying to call the function, but I get this error:
Call to a possibly undefined method.
How can I use my functions in mxml?
My AS3 :
public class InitVideoSound
{
var video:Video = new Video();
public function InitVideoSound()
{...}
public function getVideo():Video {
return video;
}
My mxml :
<fx:Script>
<![CDATA[
var ivs1 : InitVideoSound;
public function init(){
ivs1.getVideo();
start.enabled = false;
}
]]>
</fx:Script>
Try this
Make sure the neccesary import for classes are done.