我在fla文件中工作,我添加了一个swf文件。
我如何在该swf文件的动态文本上设置文本。有没有直接设置文本。我不想在url中传递参数。
我试过这个
var rq:URLRequest = new URLRequest("subwindow/Time_date.swf");
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
ldr.load(rq);
function done(e:Event):void
{
var externalSWF:MovieClip = MovieClip(e.currentTarget.content);
// I have dynamic text field named dDate. I tried like this but got error
externalSWF.dDate.text = "tdfdfd";
addChild(externalSWF);
}
我收到了错误
错误#1069:找不到属性dDate Time_date_fla.MainTimeline_ 预加载器 _并且没有默认值。
请指教我
答案 0 :(得分:3)
您在加载的swf中使用了TLF
文字吗?
在Time_date.fla中转到file> publishSettings> actionScriptSettings> runtimeSharedLibrarySettings
并将defaultLinkage
更改为mergedIntoCode
您可以详细了解此问题here
希望这会有所帮助