- import flash.display.StageScaleMode;
import flash.display.StageAlign; - stage.scaleMode = StageScaleMode.NO_SCALE;
- function loading2(e:Event):void {
- ?var total : Number = this.stage.loaderInfo.bytesTotal; //carica il numero di B totali
?var loaded : Number = this.stage.loaderInfo.bytesLoaded;//cAarica il numero di B caricati - ?bar.scaleX = loaded/total;
?showProgr.text = Math.floor((loaded/total)*100).toString() + ''%'';
?if (total == loaded) {
?play();
?this.removeEventListener(Event.ENTER_FRAME, loading2);
?}- }
- this.addEventListener(Event.ENTER_FRAME, loading2);
- skipIntro.addEventListener(MouseEvent.CLICK, function(){
?this.removeEventListener(Event.ENTER_FRAME, loading2);
?gotoAndPlay(''1'', ''sito'');
?}); - stop();
It gives me an error 1006 on line17. How is it possible? Why here and not on the 11 too?
Try not burying the handler function inside the listener...
skipIntro.addEventListener(MouseEvent.CLICK, handleSkip);
function handleSkip(evt:MouseEvent):void {
?this.removeEventListener(Event.ENTER_FRAME, loading2);
?gotoAndPlay(''1'', ''sito'');
}
And that gotoAndPlay(''1'', ''sito''); is questionable in case you have a problem geting to where it's supposed to be going.
No comments:
Post a Comment