【问题标题】:How to make animation from many images(Actionscript)如何从许多图像制作动画(Actionscript)
【发布时间】:2012-08-10 08:10:59
【问题描述】:

我需要多少图片才能制作出优秀的动画人物或火柴人之类的人物?

例如,我创建了一个 Person 类,并在其中添加了一个事件监听器 onEnterFrame,所以每个火柴人都有自己的动画

private function onEnterFrame(e:Event):void{

  addChild(image[i])
  i++;


  //thus every times increasing the i++, and add a new image


}

例如,如果我的速度为 24 fps,图像变化很快,动画效果不够好,您能否给我建议如何做到这一点?

ps:如何添加和删除child删除不需要的之前的图像?在 onEnterFrame 事件中?

【问题讨论】:

  • 不要添加每个图像。而是使用图形来绘制它

标签: actionscript-3 flash animation actionscript


【解决方案1】:

使用容器 Sprite/MovieClip 的graphics。参考:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html

假设 image[i] 是Bitmap

graphics.clear();
var bitmapData:BitmapData = image[i].bitmapData;
graphics.beginBitmapFill(bitmapData, new Matrix());
graphics.endFill();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-21
    • 1970-01-01
    • 1970-01-01
    • 2019-10-20
    • 1970-01-01
    • 1970-01-01
    • 2013-09-14
    • 1970-01-01
    相关资源
    最近更新 更多