# Predicting the external SWF content

**URL:** <https://forum.kirupa.com/t/predicting-the-external-swf-content/325996>\
**Category:** flash\
**Created:** [November 16, 2011, 11:05am UTC](https://forum.kirupa.com/t/predicting-the-external-swf-content/325996 "2011-11-16T11:05:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GiGaGiG](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@GiGaGiG](https://forum.kirupa.com/u/GiGaGiG)\
**Post date:** [November 16, 2011, 11:05am UTC](https://forum.kirupa.com/t/predicting-the-external-swf-content/325996/1 "2011-11-16T11:05:50Z")

</div>

Hi,  
I am importing an SWF as library at runtime

```auto
  private function loadDeck(str:String)
  {
   var ldr:Loader = new Loader();
   var request:URLRequest = new URLRequest(str);
   var ldrContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain); 
   ldr.load(request, ldrContext);
   ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, deckLoaded, false, 0, true);
  }
  function deckLoaded(e:Event):void
  {
   trace("DECK LOADED");
  }

```

Then I can access all SWF linkages directly, as I added the SWF library to the app-domain.  
But…! When I instantiate a new object from the SWF library, the compiler does not know the new Class, and tells me it is not a known object, obviously.

I fixed this problem deselecting “Strict Mode” from the FLA publish settings, but which is the best way to declare the exhistance of a certain class of an external SWF before it is loaded?
