Cancel a ProgressEvent from another 'loading window'


hi

 

i'd know how, if possible, how cancel progressevent.progress or how cancel 'loading' process in general.

i want know how class, happens create 'loading window' cancel button should able cancel if loading taking long liking.

 

var msg:msgclass = new msgclass();//*********** creates window message if errors happen.       

var winloading:winloadingclass = new winloadingclass();//*********** creates window loading bar , cancel button

winloading.win()//***********activates loading window

 

 

 

dispatcher.addeventlistener(progressevent.progress, progresshandler);

 

dispatcher.addeventlistener(securityerrorevent.security_error, securityerrorhandler);

 

dispatcher.addeventlistener(httpstatusevent.http_status, httpstatushandler);

 

dispatcher.addeventlistener(ioerrorevent.io_error, ioerrorhandler);

 

dispatcher.addeventlistener(event.complete, completehandler)

 

 

function completehandler(event:event){winloading.winclose()}                                                             

 

 

function progresshandler(event:progressevent):void{if (event.bytesloaded == event.bytestotal){winloading.winclose()}}

 

function securityerrorhandler(event:securityerrorevent):void{msg.win('security error');}

 

function httpstatushandler(event:httpstatusevent):void{if (event.status != 200){msg.win('connection server lost');}}

 

function ioerrorhandler(event:ioerrorevent):void{winloading.winclose();msg.win('io error');}

 

 

any appreciated

the loader class has close() method.  in documentation if need more information.  also, remove progress listener.



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support