FORUMS: list search recent posts

gotoandlearn AS3 Preloader problem

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
richard smith
gotoandlearn AS3 Preloader problem
on Dec 29, 2008 at 10:55:56 pm

hey guys, im trying to follow the video tutorial,
and have copied to step by step but keep getting the same errors,
im hoping a fresh pair of eye can see the problem as im newish to acionscript.

CODE

var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS. loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE. done);
l.load(new URLRequest("home.swf"));

function loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString();
}

function done(e:Event):void
{
removeChildAt(0);
percent = null;
addChild(l);
}


ERRORS

1119: Access of possibly undefined property loop through a reference with static type String.

1136: Incorrect number of arguments. Expected 2.

i get these twice onces for the l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS. loop); line and once for the l.contentLoaderInfo.addEventListener(Event.COMPLETE. done); line.

cheers

Rich.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]