ultraniblet
08-02-2007, 12:23 PM
Hello,
I'm just trying to get my head around Flex and building my first app, which is basically a Flex wrapper around an AS3 swf, the Flex containing various controls etc.
My question is regarding calling methods of SwfLoader.content.
I can successfully call swfloader_id.content.addChild(), but trying to call a custom method results in the "Call to a possibly undefined method" error message. Why is this?
I can however achieve my purpose by setting up the swf's class as a singleton, and calling Singleton.instance.method() which works fine. So is this the correct way to call a SwfLoader's content? Can I not do it through the Flex scope like swfloader_id.content.method()?
I have found examples for calling an AS2 swf, and calling another embedded Flex app, but not a plain old AS3 swf! :confused:
I'm just trying to get my head around Flex and building my first app, which is basically a Flex wrapper around an AS3 swf, the Flex containing various controls etc.
My question is regarding calling methods of SwfLoader.content.
I can successfully call swfloader_id.content.addChild(), but trying to call a custom method results in the "Call to a possibly undefined method" error message. Why is this?
I can however achieve my purpose by setting up the swf's class as a singleton, and calling Singleton.instance.method() which works fine. So is this the correct way to call a SwfLoader's content? Can I not do it through the Flex scope like swfloader_id.content.method()?
I have found examples for calling an AS2 swf, and calling another embedded Flex app, but not a plain old AS3 swf! :confused: