PDA

View Full Version : Linkage ID and external swf problem


pdarley
09-23-2008, 05:41 PM
Ok I am starting to finally get into AS3 and love it so far, except I ran into this problem and would greatly appreciate any help. Ok...

I have a file, "loader.swf". In its library I have a movieclip with a linkage id set to "Navigation". I am using a Document Class for loader.swf called "Base". Inside of Base.as I have setup a script to add the navigation from the library as such...

var nav:Navigation = new Navigation();
addChild(nav);

This works fine. However, when I load in an external swf, the external swf does not recognize the library item "Navigation" and throws back an error.

1046: Type was not found or was not a compile-time constant: Navigation.
1180: Call to a possibly undefined method Navigation.

The only solution was to put the Navigation movieclip in the external swf and then it works fine, but that seems like a terrible work around.

Anyone who might have some advice?

AleksandarAndreev
09-23-2008, 05:51 PM
you could try to use the same application domain when you are loading the swf, if not may be there is a problem referencing the right target, like forgetting some object or something

swfLoader.load(new URLRequest(new_swf), new LoaderContext(false, ApplicationDomain.currentDomain));