dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Flash CS3 Preloader Promblem

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    9

    Flash CS3 Preloader Promblem

    First of all I would like to say that this is my first post, with the intro out of the way I have a dilemma.

    I've been trying to make a preloader bar (for a good amount of years actually) and I think I'm finally almost there. I get the "TypeError: Error #1010: A term is undefined and has no properties."

    I assume this means that I made a typo somewhere but can't find it for the life of me.

    Here's the AC3 code:

    stop();

    addEventListener(Event.ENTER_FRAME, loaderF);

    function loaderF(e:Event):void{
    var toLoad:Number = loaderInfo.bytesTotal;
    var loaded:Number = loaderInfo.bytesLoaded;
    var total:Number = loaded/toLoad;
    if(loaded == toLoad){
    removeEventListener(Event.ENTER_FRAME, loaderF);
    gotoAndStop(2);
    } else {
    preloader_mc.preloaderFill_mc.scaleX = total
    preloader_mc.percent_txt.text = Math.floor(total*100) + "%";
    preloader_mc.ofBytes_txt.text = loaded + "bytes";
    preloader_mc.totalBytes_txt.text = toLoad + "bytes";
    }
    }

    The error only displays when I simulate download. Any thoughts?

  2. #2
    fyi, you could also use somthing like loaderInfo.addEventListener(ProgressEvent.PROGRESS , onLoading);

    i would assume you error is in the else area.. and you would have a typo in one of the object names

  3. #3
    Junior Member
    Join Date
    Nov 2011
    Posts
    9
    Oh, well where would I add the "loaderInfo.addEventListener(ProgressEvent.PROGRES S , onLoading);" part?

    Also I tried to upload it as an attachment but it's a little bigger than 300KB (also tried a zip/rar and it was still too big)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center