如何设置在多个框架上定义的具有指定名称的实例的属性

发布于 2024-08-27 01:26:11 字数 206 浏览 1 评论 0原文

我在影片剪辑中有一个选项卡按钮,具有 3 个不同的关键帧状态 - 弹出、悬停和向上。我使用每个状态上的文本字段来显示选项卡标题 - 问题是我无法在每个关键帧上对文本字段使用相同的位置,因此我对文本字段的位置进行了关键帧设置。在文本字段的两个关键帧中,它都有一个实例名称 tabText。当我向它分配文本时 - 它仅在一个关键帧上发生变化。在不以编程方式添加文本字段的情况下,我应该如何解决这种情况?

I have a tab button in a movieclip with 3 different states keyframed - popup, hover and up. I use the textfield on each state to show tab title - the problem is I cannot use the same position for the textfield on each keyframe, so I keyframed the textfield's position. And in both keyframes for the textfield it has an instance name tabText. And when I assign text to it - it changes on one keyframe only. How should I resolve this situation without adding the textfield programmatically?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

可遇━不可求 2024-09-03 01:26:11

执行此操作的唯一方法是添加一个包含文本的变量,并在每次更改关键帧时使用该变量更新文本字段。理想情况下,您可以避免所有这些,并为每个帧使用静态文本,或者以编程方式调整位置。

//initialising the variable, in frame one etc.
var content:String = "text in here";

// In every Keyframe
tabText.text = content;

the only way to do this would be to add a variable that is containing the text and update the textfield with that every time you change keyframe. ideally you would avoid all of this and either use a static text for each frame or alternatively adjust the position programatically.

//initialising the variable, in frame one etc.
var content:String = "text in here";

// In every Keyframe
tabText.text = content;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文