操纵外部图像在ActionScript 3图像、ActionScript

2023-09-08 15:21:35 作者:一抹朱砂泪渲染了誰的痛

如果我导入外部图像在AS3,是可以操纵的呢?我想有边角卷曲有点像它的一张纸,这将有可能在code?我想你可以改变图像等,但不知道从哪里开始。

If i import an external image in as3, is it possible to manipulate it? I would like to have the corners curled a bit like its a piece of paper, would this be possible in code? I thought you could transform images etc but have no idea where to begin.

在此先感谢

推荐答案

除了通过@jhocking你可以使用PixelBender创建类的页面卷曲你想更复杂的特效描述的基本操作。

Besides the basic manipulations described by @jhocking you can use PixelBender to create more complex effects like the page curl you would like.

PixelBender不动作;它实际上是一个完全不同的语言,可能是pretty的难以把握在第一。有创造一个PixelBender着色器中使用ActionScript中的两个步骤:

PixelBender is not ActionScript; it's actually an entirely different language and may be pretty hard to grasp at first. There are two steps in creating a PixelBender shader for use in ActionScript:

您创建一个PixelBender内核和编译。这个内核将读取你的图像的每个像素,根据需要改变它,然后返回这些转化像素。 您创建一个使用该编译内核的ShaderJob并将其分配到任何可视化组件要应用效果的过滤器属性。

有关详细信息,教程和视频的去DEVNET: http://www.adobe.com /devnet/pixelbender.html

For more information, tutorials and video's go to devnet: http://www.adobe.com/devnet/pixelbender.html

您可以找到一个页面卷曲PixelBender着色器的例子在这里: http://superflashbros.net/2010/06/28/a-real-page-turner/

You can find an example of a page curl PixelBender shader here: http://superflashbros.net/2010/06/28/a-real-page-turner/

和这里的演示: http://superflashbros.net/curl/