如何设置/接入外部SWF文件的行动脚本3动态文本字段? [英] How to set/access external swf file's dynamic text field in action script 3?

查看:206
本文介绍了如何设置/接入外部SWF文件的行动脚本3动态文本字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在FLA文件中工作在那里我增加了一个SWF文件。

I am working in a fla file where i added a swf file.

我如何设置的SWF文件的动态文本的文本。有没有以直接设置的文本。我并不想通过在URL参数。

How I set a text on that swf file's dynamic text. Is there any to to direct set text. I don't want to pass as parameter in 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_的 preloader 的_并且没有默认值。

Error #1069: Property dDate not found on Time_date_fla.MainTimeline_Preloader_ and there is no default value.

请咨询我

推荐答案

您使用 TLF 在加载的SWF文字?

Are you using TLF text in your loaded swf?

在Time_date.fla转到文件> publishSettings> actionScriptSettings> runtimeSharedLibrarySettings 和变化 defaultLinkage mergedInto code

in Time_date.fla goto file> publishSettings> actionScriptSettings> runtimeSharedLibrarySettings and change defaultLinkage to mergedIntoCode

您可以阅读更多有关此问题的这里

you can read more about this problem here

希望这有助于

这篇关于如何设置/接入外部SWF文件的行动脚本3动态文本字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆