AS3:将 MovieClip 或 Canvas 导出为 swf [英] AS3: Export a MovieClip or Canvas to swf

查看:30
本文介绍了AS3:将 MovieClip 或 Canvas 导出为 swf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用,用户可以在其中编辑简单的贺卡,并且应该能够将其发送给其他用户.我们目前正在通过导出到图形文件并与一些服务器脚本一起发送来实现.

I'm having an app where the user can edit a simple greeting card and should be able to send it to another user. We are currently doing it by exporting to a graphic file and sending with some server script.

现在 - 我们发现需要将该卡导出为 swf.这张卡片基本上是一个(Flex)画布,其中包含一些图像和标签.

Now - we found a need to export that card to swf. This card is basically a (Flex) Canvas holding some images and labels.

你说什么?可以做到吗?任何帮助将不胜感激.

What do you say? Can that be done? Any help will be appreciated.

谢谢!

推荐答案

将 MovieClip 对象深度复制到 ByteArray 并将其转储到文件.

Deep copy the MovieClip object to a ByteArray and dump it to a file.

var buffer:ByteArray = new ByteArray();
buffer.writeObject(MOVIE_CLIP_HERE);
buffer.position = 0;
buffer.writeBytes(...);

这篇关于AS3:将 MovieClip 或 Canvas 导出为 swf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆