0 Replies Latest reply on Mar 22, 2010 9:18 PM by luckliuyi

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

    luckliuyi

      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,

       

      Home and document online!:http://www.ourbrander.com/easyloader/

      Google code:https://code.google.com/p/easyloader/

       

                What is easyLoader?

                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.

       

                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