更改 Actionscript 3 GoToSlide 小部件中的文本样式
我正在将旧的 Captivate 4、Actionscript 2 GoToSlide 小部件转换为 Captivate 5 和 Actionscript 3。
在 Flash 中打开时,旧小部件的 FLA 文件具有 Actionscript 2 代码,其中包括位于文件时间线顶层的以下摘录。下面的倒数第三行显然控制着鼠标悬停时文本的颜色:
mc.onRollOver = function() {
this._parent._visible = true;
...
txt_fmt.color = 0xffff00;
this.item_txt.setTextFormat(txt_fmt);
}
我在等效的 Actionscript 3 GoToSlide Flash 文件中找不到任何可比较的点来定义鼠标悬停的文本颜色。任何人都可以帮我找到它,并帮助我使用 txt_fmt.color = 0xffff00; 的等效 AS3 语法吗? ?
谢谢..
I'm converting an old Captivate 4, Actionscript 2 GoToSlide widget to Captivate 5 and Actionscript 3.
The FLA file of the old widget when opened in Flash has Actionscript 2 code including the following extract sitting at top level of the file timeline. The third last line of the following evidently controls the colour of the text on rollover:
mc.onRollOver = function() {
this._parent._visible = true;
...
txt_fmt.color = 0xffff00;
this.item_txt.setTextFormat(txt_fmt);
}
I can't find any comparable point in the equivalent Actionscript 3 GoToSlide Flash file to define the text color for the rollover. Can anyone help me locate it, and help with the equivalent AS3 syntax for txt_fmt.color = 0xffff00; ?
Thank you..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以几周后...
在 GoToSlide 小部件的 FLA 文件中的 Actionscript 中 - 这似乎是组合框和列表框组件的变体 - 对于填充组合框下拉列表的循环,我这样写:
这不实际上回答了我原来的问题 - 因为它不会改变文本颜色..(对我来说,目前仍然处于太难的篮子中:我认为你必须定义一个自定义组合框或列表框组件才能做到这一点)..但是它确实控制其他组合框参数 - 下拉宽度、行高、字体等。
So after a few weeks ...
Within the Actionscript in the FLA file for the GoToSlide widget - which seems to be a variant on the combobox and listbox components - For the loop that populates the combobox dropdown, I put this:
This doesn't actually answer my original question -- in that it doesn't change the text colour .. (For me that was still in the too-hard basket for the moment: I think you have to define a custom combobox or listbox component to do that) .. But it does control other combobox parameters - dropdown width, rowHeight, font, etc.