Ok. Some progress …
So, for everyone else that is new to AS3 / FD / FP : adding a preloader to a project that is compiled with ASC2.0 has turned out not to be difficult at all.You just need to know what you’re doing …
- add a Preloader.as class to your project (see other Q&A for what code goes in there).
- in the project manager : right click on the Preloader.as class > set document class (notice how the icon is now green instead of red)
- also in the project manager : right click your project > properties > compiler options > click the plus-sign next to ‘aditional compiler options’ > click in the right colomn, next to [0] and type (without the quotes)’ -frame freeToChoseLabelName nameOfYourRealStartupClass '. There is a space between the 3 arguments (but not between - and frame).
If you compile your project and then (in the project manager) click on bin > yourProject.swf > properties, you’ll see : ‘frames: 2’.
That’s how you know you did everything right .
Now, that still did not entirely help me : even with my preloader, I see about 2 seconds of ‘nothing’, then I see my preloader flash by (no pun intended), and then I see my game.
After reading a lot of different things, that makes me think everything is still being loaded on frame 1 (instead of frame2). I know that in Flash Pro, you have to set ‘export to frame 2’ on all assets …
Anybody knows if you need to do the same thing in FD ? And how would you do it ?
I also saw someone add all images and such in the ‘lib’ folder > right click the img > add to library, and then include them in the project.
I have all my assets in folders (‘img’, ‘sound’, …) that are not part of the library… Think that makes a difference ???
Sorry for the long post