Flash 中冲击波的预加载器?
我在此页面找到了一种预加载 Flash 的酷方法 http://www.riacodes .com/flash/basic-flash-preloader/
但是是一个闪存到另一个闪存的预加载器,而无需修改另一个闪存
代码将是这样的:
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.load(new URLRequest("content.swf"));
function progressHandler(event:ProgressEvent):void
{
var ratio:Number = event.bytesLoaded / event.bytesTotal;
percent.text = Math.ceil(ratio*100).toString();
bar.scaleX = ratio;
}
function completeHandler(event:Event):void{
removeChild(percent);
removeChild(bar);
percent = null;
bar = null;
addChild(loader);
}
但我想做一些(或几个)更改为将其与冲击波一起使用),是否有任何简单的方法或者使用 cs3 和 javascript 实现某些内容会更好吗?
谢谢!!
I found out a cool way to preload a flash in this page http://www.riacodes.com/flash/basic-flash-preloader/
But is a preloader for a flash to another flash without having to modify the other flash
The code would be like this:
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.load(new URLRequest("content.swf"));
function progressHandler(event:ProgressEvent):void
{
var ratio:Number = event.bytesLoaded / event.bytesTotal;
percent.text = Math.ceil(ratio*100).toString();
bar.scaleX = ratio;
}
function completeHandler(event:Event):void{
removeChild(percent);
removeChild(bar);
percent = null;
bar = null;
addChild(loader);
}
But I would like to make a few (or several changes to use it with a shockwave), is there any simple way or would it better to implement something with cs3 and javascript?
Thanks!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Flash Player 无法加载为 Shockwave Player 设计的内容。
Flash Player cannot load content designed for Shockwave Player.