使用ProgressEvent.PROGRESS不烧在AS3 [英] ProgressEvent.PROGRESS not firing in AS3

查看:363
本文介绍了使用ProgressEvent.PROGRESS不烧在AS3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个preloader一个游戏在Flash CS6。我已经放慢了下载速度为1,2千,但使用ProgressEvent.PROGRESS永远不会被解雇。这是我有:

I trying to create a preloader for a game in Flash CS6. I've already slowed down the download speed to 1,2 kb but the ProgressEvent.PROGRESS is never fired. This is what I have:

import flash.events.Event;
import flash.events.ProgressEvent;
stop();

loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressMade);

function onProgressMade( progressEvent:ProgressEvent ):void {
trace( loaderInfo.bytesLoaded, loaderInfo.bytesTotal );
}

舞台保持空白,但onProgressMade得到从来没有所谓。有人能指出我朝着正确的方向吗?

The stage stays blank but onProgressMade gets never called. Can someone point me in the right direction, please?

推荐答案

试试下面这个教程:的 http://stephenscholtz.com/201110/single-movie-flash-$p$ploading-as3

Try following this tutorial: http://stephenscholtz.com/201110/single-movie-flash-preloading-as3

这篇关于使用ProgressEvent.PROGRESS不烧在AS3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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