collapse content

Forum: bugs and problems

Subject: How do you get Preloader to work in FlashDevelop?

Comment:

Naralus (Author) 1 year ago
http://www.platogo.com/devcenter/articles/components

I've read the instructions on the preloader API, but it seems that I cannot get it to run on FlashDevelop. The error I keep getting is...

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.platogo.components::Preloader/frame1()


That's what happens whenever I perform a new Preloader()

If needed, here's the first part of my code:
   
        import com.platogo.components.GameHighscore;
   import com.platogo.components.Preloader;
   
   /**
    * ...
    * @author Test
    */
   public class Main extends Sprite
   {
      private var prel:Preloader;
      
      public function Main():void
      {
         prel = new Preloader(); // <-- it errors here
         prel.y = 300;
         prel.gameId = <removed>;
         prel.jumpFrame = &root&; // <--- i'm not even sure if this is right
         this.addChild(prel);
         
         if (stage) init();
         else addEventListener(Event.ADDED_TO_STAGE, init);
         
         
      }


Help on using the preloader would be really appreciated :). I don't understand the instructions on the Components page that much. I wouldn't mind using Platogo's default loading MovieClip for now.

Thanks!!

(and a follow up question)
How do you get that percentage loaded thing to appear?

Comment:

sirflo (Staff) 1 year ago
Thanks for reporting this issue.

We successfully tested the preloader in various environments. However, we didn't try it with FlashDevelop so far (the Flash people in our team are all using Macs curiously). I'll take a look into this.

nurolhaida 3 months ago
I'm not a programmer , but then I need some help. where suppost I need to paste these code actually more...
mikebelotti 4 months ago
Right. The game is "Vowel Movements", and it's normally fine--but I haven't been able to isolate thi more...
Bram Schoonhoven 4 months ago
If you try to invite friends on facebook you get a popup/layer where you can invite friends. This po more...