Skip to main content
Known Participant
January 16, 2009
Question

LOADING EXTERNAL SWF PROBLEM

  • January 16, 2009
  • 2 replies
  • 602 views
Problem adding an external nav swf (bottom of attached code). 1046: Type was not found or was not a compile-time constant: Loader. I used the loader code in another projectwithout problems. It was in my actions layer on the timeline however the loader x,y addChild were NOT in a function. Can't figure out please help Thanks!
This topic has been closed for replies.

2 replies

Participating Frequently
January 16, 2009
Oh, even simpler. You need to at least import the Loader class.

***Of course if you were using FlexBuilder it would have done that for you ;-)
Participating Frequently
January 16, 2009
First impression is that you are loading the app into a seperate application domain. This is the typical error for that. You need to set the loader context to the application current domain.

var context:LoaderContext = new LoaderContext(false,
ApplicationDomain.currentDomain);
loader.loaderContext = context;
loader.load(url);

Something like that. Then they are referring to the same class definitions.