Flash CS5 TLFTextFields and FlashVars Problem
I have found that when I use a TLFTextField in Flash CS5 I no longer have access to the FlashVars passed in from HTML.
For example, when there is a TLFTextField on stage the following document class doesn't find any FlashVars ...
(In this example I am using Arthropod to view the output -http://arthropod.stopp.se)
package
{
import flash.display.MovieClip;
import flash.display.LoaderInfo;
import com.carlcalderon.arthropod.Debug;
public class TraceFlashVars extends MovieClip
{
public function TraceFlashVars():void
{
Debug.clear();
// Trace out all the FlashVars
Debug.log("-- FLASHVARS --------------------------------");
var keyStr:String;
var valueStr:String;
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
var numOfFlashVars:int = 0;
for (keyStr in paramObj) {
valueStr = String(paramObj[keyStr]);
Debug.log(keyStr + ": " + valueStr);
numOfFlashVars++;
}
Debug.log("---------------------------------------------");
if (numOfFlashVars == 0) {
Debug.log("No FlashVars were found!");
} else {
Debug.log(numOfFlashVars+" FlashVars were found.");
}
}
}
}
I've done some Googling and found a blog post by Steven Sacks which is related, but is more about loading child SWF and not FlashVars.
http://www.stevensacks.net/2010/05/28/flash-cs5-tlf-engine-causes-errors-with-loaded-swfs/
Please can you help me get my FlashVars working again?
Cheers,
Adrian
