Jump to content


LoaderMax + .swc Preloading SelfLoader

Recommended Posts

I have an ActionScript project in FlashBuilder that publishes to the .fla in the Flash IDE and uses a document class. In it, I'm importing LoaderMax & necessary classes. Also, the project has a .swc library that I added to the FlashBuilder project for assets (just MovieClips) that I export for ActionScript. I wish to make a basic preloader for the project using LoaderMax's SelfLoader class. The project .swf itself is 29kb and instantiate it like so:


var self:SelfLoader = new SelfLoader (this, {name:"self", onProgress: _loadAppProgressHandler, onComplete:_loadAppCompleteHandler});
self.load ();


I of course have the handlers setup correctly. There's nothing but a blank stage until the whole file loads when I simulate download. I'm not sure if I'm doing something wrong or if this has something to do with using the .swc file & with movieclips set to export to frame 1 causing the blank screen or the combination of both LoaderMax & .swc. It's odd that the preloader or anything, does not show until the file is completely loaded no?


EDIT: Also, I'm trying to avoid the container swf that loads in the app swf setup, in case that's anyones suggestion. Thanks in advance.

Link to comment
Share on other sites

it sounds like everything in your swc is being loaded on frame 1 or compiled into frame 1. not exactly sure of the exact technical details.

so your progress bar won't display until everything associated with frame 1 has loaded.


the best way to use selfLoader is to have a very very low kb load on frame 1 so that your progress bar can display as soon as possible and in a typical fla setup the "heavy" assets would be on frame 2 or further down the timeline.

Link to comment
Share on other sites

Hi Carl,


Thanks for responding! I actually have the file that creates the .swc file set to load on frame 2 and all subsequent export-for-actionscript movieclips in the library as well. I'm curious if perhaps the .swc assets are still trying to load in the frame one of the main .swf? This is my first time using .swc & LoaderMax SelfLoader, so I'm a little unsure of the unexpected results that I'm experiencing.

Link to comment
Share on other sites

So I got the preloader working correctly, not entirely sure what it was, but I think I needed to check where I was placing the SelfLoader line of code in relation to the stop ()/ gotoAndStop (2) code and instantiating the preloader movieclip... if that makes any sense.


I also started a new .swc with just the preloader movieclip and exported it to frame 1. I think another problem I was experiencing was that I was trying to load the preloader asset from the main .fla library and Flash Builder was not recognizing the AS Linkage name of the preloader movieclip in the main .fla library for some reason.

Link to comment
Share on other sites

thanks for posting your results. glad to here you figured it out. I'm sorry I couldn't have been of more help. I too don't have a lot of experience with swcs.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.