[英]Got the error 1046 when changing the property of a component from a RSL
I got a problem about the RSL. 我对RSL有问题。 I created a RSL named a.fla, and I created a component which basic class is XXButton.as(written by myself.), I reflected some property for designers to change the button's label, besides, this component's Name and Class are both
"ShareLib_Button"
. 我创建了一个名为a.fla的RSL,并创建了一个组件,该组件的基本类是XXButton.as(由我自己编写。),我为设计人员反映了一些用于更改按钮标签的属性,此外,该组件的Name和Class均为
"ShareLib_Button"
。
Then I put the button in B.fla as a import component(checked the "Import for runtime sharing."). 然后,将按钮放入B.fla中作为导入组件(选中“导入用于运行时共享”。)。 And I ignored the "Automatically declare stage instance" in the flash publish setting.
而且我忽略了Flash发布设置中的“自动声明舞台实例”。
When I just put this component on B's stage, exporting the fla is ok. 当我仅将此组件放在B的舞台上时,导出fla就可以了。 But when I changed the property which I reflected of the component, I got the error 1046.
但是,当我更改反映组件的属性时,出现错误1046。
"1046: Type was not found or was not a compile-time constant: ShareLib_Button".
Does anyone have any ideas about it? 有人对此有任何想法吗?
Thanks in advance! 提前致谢!
Echo 回声
Although I don't have much experience with Runtime Shared Libraries, the error is indicating that it doesn't have access to your library when you compiled b.fla
. 尽管我对运行时共享库没有太多经验,但错误表明在编译
b.fla
时它无权访问您的库。 Try the following: 请尝试以下操作:
In your a.fla
file... 在您的
a.fla
文件中...
In your b.fla
file... 在您的
b.fla
文件中...
The issue is because I tried to access an unknown property. 问题是因为我尝试访问未知属性。 I need to declare an instance name(Because of some reasons, we don't use instance names, I removed this setting, and fill an instance name), it works!
我需要声明一个实例名称(由于某些原因,我们不使用实例名称,我删除了此设置,并填写了实例名称),它可以工作!
Thanks everyone who cares this. 谢谢所有关心这个的人。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.