algorithm - flash 和 actionscript 中的动态动画

标签 algorithm actionscript-3 flash animation dynamic

长期的粉丝。

我希望为我目前的美术文凭类(class)中的主要创意项目创建一个动态动画引擎。我过去有一些编程经验,但不擅长我目前正在研究的领域。

我想知道我的想法是否可行,如果可行,我需要什么语言/等来实现它。

我意识到这是一个大问题,所以我会尽量具体和描述性越好

我目前正在考虑使用 Flash 和 Actionscript 3。

目前简单的操作说明如下:

User is presented with a drawing input whereby they can draw using just black. Once they have finished their drawing they click a submit button and the drawing becomes a frame in an ongoing animation.

However each frame that is submitted is analysed by the program and its compared to all other frames currently in the animation. The program then sorts the new frame (and possibly all or any appropriate other frames) into the animation in an order where the pixel data is closest to the frames either side of it.

The program could possibly do this resort in the background, or at interval times or any way that works really.

The animations frame rate would also speed up partially over time as more frames are added making the animation longer and faster (to a point perhaps).

Perhaps:

framerate = totalFrames / n

or something along those lines

我目前的想法是:

我意识到最困难的方面是根据帧的像素位置数据对帧进行分析、比较和重新排序。我觉得可以通过某种位图分析来实现。

由于我是提问流程的新手,如果有任何不清楚或不好的做法,请拉我上来,我会尽快改正。

谢谢你。

最佳答案

虽然使用 AS3 和 Flash 确实可以存储绘图和动​​画,但将帧放入先前绘制序列的正确算法几乎是不可能的。最简单的例子:一个时钟,一个箭头指向 12、1、2...等,现在我们已经创建了一个箭头指向 12 的动画作为一帧,现在要添加一个箭头指向的帧在 1. 程序应该如何对该帧使用react,将其作为第一帧还是第二帧?如果艺术家会玩得开心,会先画 12,然后画 6,然后画 2(然后是所有其他人)——程序如何确定它是 12-1-2-3-4...?请注意,即使只有一个箭头,甚至没有数字或线条,也只有一个像素在两个连续帧(或一组作为轴的像素)中是公共(public)的。另一种情况——一条横线往下掉,共有0个像素点。还有一些示例,其中一个框架可能会插入到其他两个不应该插入的位置之间,而不管您使用的位图接近度度量如何。因此,我建议您改用手动排序,不要玩这种高科技。

可以执行变速动画显示,但不能用 MovieClip,因为你不能动态制作一个,但是用一系列 BitmapData 对象,一个 Bitmap 对象和自定义 enterframe 监听器。 (和/或一系列形状)

关于algorithm - flash 和 actionscript 中的动态动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18566248/

相关文章:

游戏开发的 Flash 性能 : native render VS BitmapData framebuffer

java - 将数据从复杂的 HTML 表中提取到 Java 中的二维数组

xml - 使用 as3 从 XML 获取属性值

javascript - 如何使用 Adob​​e flash 创建整页背景图像

apache-flex - as3导出为pdf?

flash - Flex 视频 session 应用程序 - 音频与视频

algorithm - 使用 2 个数字求和的方法数

c++ - 三角形类 C++

algorithm - 使用递归程序时空间复杂度的差异

flash - 如果没有 System.gc() 调用,对象不会被删除