【发布时间】:2014-04-17 11:13:32
【问题描述】:
在我的程序中,我有一个在屏幕上滚动文本的功能。这工作正常,除了令人难以置信的滞后运动。我只是将速度添加到文本字段的 x 位置,并且移动动画适用于所有其他对象(电影剪辑、位图等)。
编辑:
我现在尝试将文本转换为位图,然后移动它。不幸的是,这导致了同样的“滞后”运动,伴随着许多突然的“跳跃”。
bmd = new BitmapData (event_field.width, event_field.height, true, 0);
bmd.draw (event_field);
bm = new Bitmap (bmd);
bm.x = event_field.x;
bm.y = event_field.y;
bm.cacheAsBitmap = true;
bm.smoothing = true;
this.addChild(bm);
在我的输入框功能中:
bm.x-=3
有人对此有解决方案吗?
【问题讨论】:
-
你能不能也展示一下你是怎么做动画的?因为也许你的动画滞后是由于你尝试动画的方式
标签: actionscript-3 optimization textfield smooth-scrolling