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

Making a preloader in AS 3.0

New Here ,
Dec 20, 2007 Dec 20, 2007
I'm trying to make a preloader in Actionscript 3.0 that shows a increasing status bar as the main swf is loaded. Unfortunately, when I try and do so, the swf loads all of the fla's sound files that are linked to external .as class files BEFORE my preloader. If I uncheck "Export in first frame" in the sound's linkage options, I get hit with 'Invalid Sound' errors every time I try and dynamically load the sound.

How am I supposed to get this working correctly? All sounds must come from within the FLA. I cannot load external sounds or external swfs with sounds in them. In actionscript 2.0, I had to use a little cheat which involved putting all sounds inside of a movieclip and placing it on frame 2. This doesn't seem to work in AS 3.0.
TOPICS
ActionScript
1.1K
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
Advisor ,
Dec 20, 2007 Dec 20, 2007
best plan would be to set up another flash file that does the preloading.
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 ,
Dec 20, 2007 Dec 20, 2007
I just told you, it has to be in the same file. Just like in AS 2.0. One FLA file, all sounds in the file, no external loading. The whole project should end up as a single swf 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
New Here ,
Dec 21, 2007 Dec 21, 2007
and you've tried setting the export in frame option to frame 2 as well as the include file for the external .as for the sounds and made sure all relevant code in frame one for those sounds was also placed in 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
Community Expert ,
Dec 21, 2007 Dec 21, 2007
make sure your not using any of your sounds in the first frame(s). and, in the publish settings, set your "export classes in frame __" to the correct frame.
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 ,
Jan 07, 2008 Jan 07, 2008
None of these fixes have worked.

I'm trying something new. In the sound's linkage settings in the library, I link it to an AS3 class that extends Sound and ask it to not export on frame 1 so that the load bar can load first. In the publish settings, I set all classes to load on frame 5. The class that I instantiate that calls for a dynamic sound is loaded on frame 6.

Still, nothing works. What on Earth am I doing wrong?
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
Engaged ,
Jan 08, 2008 Jan 08, 2008
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
Contributor ,
Jun 20, 2008 Jun 20, 2008
i am having the same problem with this. i am dynimcally loading audio from the internal library so i have all the audio files linked. however, AS3 throws errors when you uncheck Export Frame 1.

This is a serious problem that needs to be addressed by Adobe!!
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
Engaged ,
Jun 20, 2008 Jun 20, 2008
LATEST
I've stopped using document classes. A document class has to load on the first frame, and anything it references will also load on the first frame, and anything they reference will load on the first frame, even if you set your linked library items and classes to load on a different frame. For me, that makes document classes useless. I have built pre-loaders that are separate .swf that load and monitor the main .swf. A good reason to build a pre-loader within the main .swf is reusing library art. Using another .swf just for preloading is not always the best solution. I hope Adobe and users don't forget that Flash is a multimedia application, and maintaining file size/download times is very important. I'm hoping in Flash 10 a document class can be set to load on a different frame, until then I only use them during testing and alpha builds.
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