Skip navigation
Currently Being Moderated

proLoader that works on one Fla fails on another?

Mar 1, 2012 6:04 PM

Hi team,

I have some proLoader code that works on one FLA file and I am trying to reuse the code on another file to pull in the exact same .swf in the same location and I am getting this error..

What do you reckon is going on?

Cheers

sub

 

 

Error: Error #2099: The loading object is not sufficiently loaded to provide this information.

  at flash.display::LoaderInfo/get loader()

  at fl.display::ProLoader/get realLoader()

  at fl.display::ProLoaderInfo()

  at fl.display::ProLoader()

  at aavar/WB_load()[aavar::frame1:73]

 

Here is my code,

 

 

WB.addEventListener(MouseEvent.CLICK, WB_load);

function WB_load(event:MouseEvent):void

{

          dictionaryhome.visible=true;

          alwayshome.visible=false;

 

          WB.visible=false;

                    wb_ProLoader = new ProLoader();

                    wb_ProLoader.load(new URLRequest("SB_wordbook.swf"));

                    addChild(wb_ProLoader);

          }

          dictionaryhome.addEventListener(MouseEvent.CLICK, WB_unload);

 

          function WB_unload(event:MouseEvent):void{

                    wb_ProLoader.unloadAndStop();

                    removeChild(wb_ProLoader);

                    wb_ProLoader = null;

                    dictionaryhome.visible=false;

                    alwayshome.visible=true;

 

          WB.visible=true;

          }

 
Replies
  • kglad
    63,069 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 2, 2012 7:22 AM   in reply to subtlefly72

    are you using cs5.5? 

     

    is SB_wordbook.swf an as3 swf?

     

    was it published with cs5.5?

     

    which is line of code is line 73 in frame 1?

     
    |
    Mark as:
  • kglad
    63,069 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 2, 2012 7:50 AM   in reply to subtlefly72

    if you were trying to unloadAndStop() your loader before loading was complete, you'll get that error message.  there are many ways to prevent that including:

     

     

     

       function WB_unload(event:MouseEvent):void{

    if(wb_ProLoader.content){

                        wb_ProLoader.unloadAndStop();

                        removeChild(wb_ProLoader);

                        wb_ProLoader = null;

                        dictionaryhome.visible=false;

                        alwayshome.visible=true;

     

              WB.visible=true;

    } else {

    // you can use the close() method if loading is in-progress.  ie, if WB has been clicked and this else-branch executes

    }

              }

     
    |
    Mark as:
  • kglad
    63,069 posts
    Jul 21, 2002
    Currently Being Moderated
    Mar 2, 2012 7:58 AM   in reply to subtlefly72

    you're welcome.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2012 1:13 PM   in reply to kglad

    I'm having the silimar problem with same error from ProLoader, except I'm using the UILoader in one of

    mc, and there's no buttons invovled. I'm not sure about the meaning of "by rebuilding my document class",

    can anyone explain how does it work? thanks!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points