UIScrollbar 组件在 flash cs4 中不起作用
好的,我有一个名为 logtxt 的动态文本框,并且附加了一个 UIScrollbar。它有效,但前提是我通过将其键入/粘贴到文本框中来添加它。当我通过代码添加文本时,我需要它才能工作。 (它通过组件检查器正确链接)
Ok so i have this dyanamic textbox called logtxt and i have a UIScrollbar attached to it. It works, but only if i add it through typing/pasting it into the textbox. I need it to work when i add the text through the code. (it is linked correctly through the components inspector)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过代码完成这一切,没有问题,例如将其放在您的主时间轴上;
如果您想对现有文本字段执行此操作,请将此代码放在其所在上下文中的位置。
You can do this all through code no problem, for example put this on your main timeline;
If you want to do this with your existing textfield, put this on this code in a place that is in context where it is located.
我制作了影片剪辑“drag_mc”和“track_mc”,并将它们放入名为“scroll_mc”的影片剪辑中。然后我有一个用于制作滚动条的类:
文档类
文本框
scroll_txt是从http://www.webdevils.com/2007/10/13/as3-version-of-scrollbar-class/
I made the movieclips drag_mc and track_mc and put them in a movie clip called scroll_mc. Then i have a class for making the scroll bar:
and a document class
scroll_txt is the textbox
got it from http://www.webdevils.com/2007/10/13/as3-version-of-scrollbar-class/