Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How To Create a Preloader to a Flash Game

New Here ,
Jun 25, 2013 Jun 25, 2013

I'm just beginning to get into flash game programming. I know enough to make a functioning project, but not how to make it efficient or do specific tasks, in this case how to add a preloader. I've found several tutorials online, but none that go along with how I've seen is the best method to program. From what I've seen, it is best to program all of my code into one .as file and link this file to the main document. This makes it easy for me to make all of my variables global in scope, which lets me addChild/removeChild in various different functions. The only problem is that I can't find a tutorial on creating a preloader with this method in mind. All tutorials that I've found generally have two frames in the timeline, one with the preloader and one with the content, but I've been told this is not a good way to program. If anyone could help I'd appreciate it a lot. I can paste the source code of one of my learning projects if it would help to provide an answer to my question.

TOPICS
ActionScript
787
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 25, 2013 Jun 25, 2013

you'll probably find it easiest to create a new main fla that will load your game swf.  your new main fla will contain the assets to display your preload and nothing else.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 25, 2013 Jun 25, 2013

Hi, do you mean create 2 seperate files? I'm making games to be sent in to flash portals, which means that my options are limited to keeping it within the single file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 25, 2013 Jun 25, 2013

then you'll need to export your classes in frame 2 (file>publish settings>advanced actionscript settings, export in frame2 and change the export frame of exported class symbols in your library) and you'll need to stop your main timeline on frame 1, run your preloader and, when loading is complete, advance your main timeline to frame 2.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 25, 2013 Jun 25, 2013

Alright, I'll try that and post again if I have any more problems. Thanks for the help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 25, 2013 Jun 25, 2013
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines