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

TxEff AS3.0

(views: 8650)

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: 580)

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.
ldr.load(urlReq,addedDefinitions);
addChild(ldr);

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.


User Comments

how about the size?
posted by tamt on 2008-05-30

in this case, the several external animation swf will compile the same TXEFF component for several times. and the files size will be huge.

do you have any idea to avoid compile the same TXEFF, like flash DLL? can u give us a example ?
how about the size?
posted by negush on 2008-05-30

Indeed, each external .swf will contain the TxEff component but their size but that will not increase the loading swf's size. If you want to avoid compiling the TxEff into each external .swf file, you could try to compile them without the TxEff (of course the animations won't work) and include the component only into the loading .swf. In this case you shouldn't change the application domain.


Login to post your comment login to post your comment



Back

Knowledge Base Search

Enter keywords bellow:
Advanced Search

Menu

FlashEff Premium Special Offer



Get your FlashEff Premium Now!

Free Trial Versions

The trial versions do have a major limitation. They will ONLY run into debugger flash player versions, such as the Flash IDE player and the activeX FP used by developers.

Switch from Free Trial version to Full version.

You can switch from Trial to Full versions in a blink of an eye.
See this tutorial in order to find out how.

We accept Google Checkout

Google Checkout Acceptance Mark

Secured by VeriSign

Translate this page