My account
Shopping cart
Knowledge base

Knowledge Base

Important! All new questions are usually answered within the next business day.

TxEff AS3.0

(views: 38400)

TxEff is a AS3.0 Flash Component especially developed for web designers that need to include text animations within their Flash movies in a fast and reliable manner.

Main TxEff animation loads external TxEff animations

(2008-04-14 - views: 9918)
Q: If there is main .swf file that contains a TxEff animation with the Blur pattern and this main .swf file loads several other external .swf files, all containing TxEff animations with different external patterns, there will be "pattern unavailable" error message displayed in the output panel. This happens even if all the external patterns used, are placed correctly in the Library of each external .swf file. The error message disappears if I place all the external patterns into the Library of my main file.

How should the external TxEff animations be loaded correctly so there won't be the need to place all the patterns I use, into the Library of the main .fla ?

A: When the external .swf files are loaded by the Loader instance, they are loaded into a different application domain, so when those TxEff instances look for their patterns in the Library, they no longer find them and the "pattern unavailable" error message is displayed into the Output panel.

To solve this issue, the external .swf file containing your TxEff animation should be loaded into the same application domain as the main .fla:

// Create a new loader context with the application domain as the current
// application domain.

var addedDefinitions:LoaderContext = new LoaderContext();
addedDefinitions.applicationDomain = ApplicationDomain.currentDomain;

// Create the Loader object that will load your external .swf file.
var ldr:Loader = new Loader();
var url:String = "external_anim.swf";
var urlReq:URLRequest = new URLRequest(url);
// Load the .swf file with the new loader context.

Each of your external animations should be loaded like that, with the above loader context settings.

As for the embedded font. the main file should embed into it all the characters used by the TxEff animations of the external files. In this case the external .swf files do not need to have the characters embedded for the TxEff animation. Those characters will be taken from the main file.