Issue

When loading child SWFs that contain Text Layout Framework (TLF) content into a parent SWF, you receive reference errors due to the preloading methods used by TLF. Below is an example of a reference error you might encounter:

ReferenceError: Error #1069: 
Property outAnimation not found on senAbout_fla.MainTimeline__Preloader__ and there is no default value.
      at senBackground_fla::MainTimeline/handleSWFAddress()
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at SWFAddress$/_dispatchEvent()
      at SWFAddress$/setValue()
      at senBackground_fla::MainTimeline/buttonPressed()

Solution 1

The simplest approach is to change the default linkage for the TLF SWC to merged into code for each child SWF. For instructions on how to do this, see the documentation on merging the TLF SWC code into your project. Below are some notes to remember when using this solution:

  • Users will want to keep the Flash Player from caching content so that the content gets uniquely loaded every time the SWF is loaded. To keep the player from caching your content you must you must move all content and scripts in each child SWF to frame 2.
  • In the Advanced ActionScript 3.0 Settings you must Export Classes in frame 2 (not frame 1).
  • You then must adjust the Preloader method to Custom Preloader loop and recompile each child SWF.
  • The child SWFs may compile with errors, but will work correctly when loaded into the parent SWF. 

Solution 2

Download and use the SafeLoader class to load your SWF files that contain TLF textfields. Place the fl.display.SafeLoader and fl.display.SafeLoaderInfo AS files in your classpath and instead of using the Loader class to load the child SWFs, use the SafeLoader class.

 

 

Keywords: cpsid_83812

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy