ok try this. (i am not gonna explain each thing step by step :) )
first u have main template where u coded to load all the external files right?
1. now create a new AS3 file and save it in the same folder
2. resize it to same as the main template.
3. Make 5 layers. Name them as follows: >>
actions
loader
preloader
preloadercontent
4. in the action layer paste this code:
loader.addEventListener(ProgressEvent.PROGRESS, onProgress);
loader.addEventListener(Event.COMPLETE, onComplete);
function onProgress(e:ProgressEvent):void
{
var loaded:Number = loader.bytesLoaded;
var total:Number = loader.bytesTotal;
preloader_mc.scaleX = loaded / total;
}
function onComplete(e:Event):void
{
removeChild(preloader_mc);
removeChild(outline_mc);
}
5. in the loader layer grab a UILoader from the > Components > User Interface
6. drag it to stage (make sure the x and y = 0)
7. in the properties panel name it "loader"
8. click on the parameters in the properties panel and choose these setting:
autoload: true
maintainAspectRation: true
scaleContent: false
source: link it to the main template
9. close that layer and Now, in the preloader layer
make a shape. (make sure the only fill color is selected)
(Width: 400)
(height: 30)
10. convert it to a moveclip. give it a Instance name "preloader"
11. make sure the preloader is selected. In the properties panel name it "preloader_mc"
12. Close preloader layer, now the preloadercontent layer
13. create shape on the stage. choose any color u like (width: 407 | height: 40)
14. convert it to a movie clip and give it a instance name "outline"
15. select the "outline" in the properties panel give it a name "outline_mc
16. test ur movie and everything should load together




LinkBack URL
About LinkBacks





Reply With Quote


Bookmarks