Skip to main content
Participating Frequently
April 19, 2010
Question

Loading external swf files in a swf - Error#1009

  • April 19, 2010
  • 1 reply
  • 2869 views

I have been having trouble using a swf file within a swf file.   The external swf files all work as expected.  However when used within another swf file I get the standard TypeError #1009 for some of my swfs.   The external swf files are mainly actionscript 3 files.  A typical swf file will have an object (or objects) in the library which has an export for ActionScipt property enabled and an addEventListener(Event.ENTERFRAME, somefunction).   About four years ago when I had to do some work with AS2 I seemed to get around a similar issue with the _lockroot method but this is no longer part of AS3. I have searched various forums and note that I am not the only one with this issue but did not find any relevant solutions.   If anyone could give me any ideas on how to get around this it would be appreciated.

Regards

Norman

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 19, 2010

check the applicationdomain class.

Norman1Author
Participating Frequently
April 19, 2010

Thank you for your prompt response.   I had checked the applicationdomain class and done some reading on this but that did not seem to be the issue.   I did some experimentation on this with swfs that did and did not work to see how it all worked.  All my swfs are in the same domain.  My original thought was that maybe it had something to do with timelines or the stage.   Looking at the common elements, I have used either Event.ENTER_FRAME, or stage.StageWidth (or similar) and library objects such as 'particle' or 'button' which have linkages.

Regards

Norman

kglad
Community Expert
Community Expert
April 19, 2010

if you have classes set for export in your loaded swf's library and you're having trouble instantiating them WHEN your swf loads and not when it runs without being loaded, the applicationdomain is the issue.