# easyLoader,be more stronger,more simple!load all types of files in one way!

**URL:** <https://forum.kirupa.com/t/easyloader-be-more-stronger-more-simple-load-all-types-of-files-in-one-way/306823>\
**Category:** flash\
**Created:** [March 23, 2010, 3:51am UTC](https://forum.kirupa.com/t/easyloader-be-more-stronger-more-simple-load-all-types-of-files-in-one-way/306823 "2010-03-23T03:51:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ourbrander](https://avatars.discourse-cdn.com/v4/letter/o/85e7bf/32.png) [@ourbrander](https://forum.kirupa.com/u/ourbrander)\
**Post date:** [March 23, 2010, 3:51am UTC](https://forum.kirupa.com/t/easyloader-be-more-stronger-more-simple-load-all-types-of-files-in-one-way/306823/1 "2010-03-23T03:51:11Z")

</div>

Hi,guys!Very happy to announce to the world,my easyLoader project was updated to 1.012.  
this class can be used to load sound,video,txt,xml,image,swf,event dae and on.and you guys can add custom file type for easyLoader.  
author :liuyi [email:ourbrander@gmail.com](mailto:email:ourbrander@gmail.com), **Home and document online!** :[http://www.ourbrander.com/easyloader/](http://www.ourbrander.com/easyloader/)  
**[COLOR=“black”]Google code[/COLOR]**:[https://code.google.com/p/easyloader/](https://code.google.com/p/easyloader/)

```
      What is easyLoader?
      [COLOR="Red"]This work is use load all the assets of website or game,it is an good assets manager.
      People can use it to load sound,video,txt,xml,image,swf,dae and any custom types of files.[/COLOR]
      
      Why we need it?
      -easy of use
               Every method have a good naming,you can use it likes speak to an friend.Only need several lines to complete the work.
      
      -never be lost items
        load items one by one.
      
      -excellent memory manage
               Using it continually more than 24 hours,memory do not increase without limit.item can be destoried,easyLoader Object(include all assets) too.
      
      -flexible
              User can add custom file type to loading.
      
      -dynamic add items for easyLoader
       EasyLoader can add and load new assets anytime and anywhere,although all the items were loaded.
      
      -Updates
       will updates according to user's requirements.
      
      
      How to use?
      
      Realy only need several lines:
      
      step1:
      new a easyLoader Object
      line1: var _assetsManager = new EasyLoader();
      
      step2:
      add some necessary event Listener
      line2: _assetsManager.addEventListener(EasyLoaderEvent.COMPLETED,assetsLoaded)
      
      step3:add the assetsLoaded function
      line2:private function assetsLoaded(e:EasyLoaderEvent) {
       line3: //put some code to here like init()
       line4:}
       
       step4:load assets according to config xml
       line5:_assetsManager.loadConfig("assets.xml")
       
       ok,this is all!

```

Public Methods

EasyLoader()  
addFile(path:String, alias:String = “”, loadTip:String = “”, autoRemove:Boolean = false, method:String = “text”):void  
addType($type:String, $name:String):Boolean  
dispose():void  
disposeFileByAlias(alias:String):Boolean  
disposeFileByName(name:String):Boolean  
getFileByAlias(alias:String):LoadedItem  
getFileByIndex(number:uint):LoadedItem  
getFileByName(name:String):LoadedItem  
init(obj:\* = null, $autoLoad:Boolean = true, $ignoreError:Boolean = true):Boolean  
loadConfig(str:String):void  
pause():void  
removeFileByAlias(alias:String):Boolean  
removeFileByName(name:String):Boolean  
start():void  
unPause():void
