打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Flash中使用FlashPaper - javaplan - JavaEye技术网站

Flash中使用FlashPaper

在Flash中使用FlashPaper

我们可以将一个FlashPaper文档插入到Flash的FLA源文件中。当把FLA文件导出为SWF文件时,FlashPaper SWF文件就会嵌入到导出的SWF文件中。

下面的代码显示了一个普通的Flash FLA文件是如何使用 loadFlashPaper() 函数载入一个FlashPaper SWF文档的。

function loadFlashPaper(
path_s, // path of SWF to load
dest_mc, // MC which we should replace with the SWF
width_i, // new size of the dest MC
height_i, // new size of the dest MC
loaded_o) // optional: object to be notified that loading is complete
{
var intervalID = 0;
var loadFunc = function()
{
dest_mc._visible = false;
var fp = dest_mc.getIFlashPaper();
if (!fp)
return;
if (fp.setSize(width_i, height_i) == false)
return;
dest_mc._visible = true;
clearInterval(intervalID);
loaded_o.onLoaded(fp);
}
intervalID = setInterval(loadFunc, 100);
dest_mc.loadMovie(path_s);
}

下面的代码显示已经嵌入一个FlashPaper SWF文档后如何使用 loadFlashPaper() 函数。

function onLoaded(fp)
{
// loading is complete, so we can now adjust the current page, zoom, etc.
// go to page 50.
fp.setCurrentPage(50);
// change magnification to 33%
fp.setCurrentZoom(33);
}
loadFlashPaper("FlashPaper.swf", theDocMC, theDocMC._width, theDocMC._height, this);

其中fp.setCurrentPage值被设置为50,fp.setCurrentZoom值被设置为33,当FLA文件被导出时,嵌入的FlashPaper SWF文件以33%的放大倍率在导出的SWF文件中出现。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
几款虚拟打印机的奇妙用途3
分享一个软件,将文件转换成swf格式(flash)
不可思议 文档变成SWF
把word文档转换成swf格式
收集制作文档资料的好帮手:FlashPaper 2
图解FlashPaper的使用方法
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服