Beno wrote: > var main:Main = new Main(); > addChild(main); > main.init(); > stop();
Hi Beno, If you're working in Flash, and you have main as your document class, I don't think you need to add it as a child to the stage. I'm assuming Main is a separate .as file. I'm not sure what the problem is with your code, but I'd like to point you to one of the most valuable tools in the Flash IDE--the debugger. Once you start using it, you will wonder how you every got along without it. To start using it, click on the line that says main.init(), in the farthest left column, to the left of the line numbers. A red dot will appear--that's known as a break point. Now press ctrl-Enter and Flash will launch a debug version of your program. When the code reaches the break point, it will pause and give you a screen where you can pretty much see everything that's going on. Variables and their value, the path your code took (the call stack), and all sorts of other information. You can step through you code a line at a time and watch what happens. You can step into a method to see the code executing in the method. Honestly, you will learn more about your code this way than all the advice you can get from us. It will take some experimenting, and it may not immediately be apparent how to use it, but experiment. Play around. Read up on using the debugger. You won't be sorry. You will have uncovered one of the most valuable programming tools any IDE has to offer. The only caveat is that you have to be developing in Flash. I don't think FlashDevelop, for all its power, has a debugger. If you still can't figure it out, send me a copy of your code offline and I'll take a look at it. Cordially, Kerry Thompson Senior Software Engineer Family Education Network _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

