[code] Update: LoaderClass
来源: BlogBus 原始链接: http://www.blogbus.com:80/blogbus/blog/diary.php?diaryid=10436 存档链接: https://web.archive.org/web/20040624202848id_/http://www.blogbus.com:80/blogbus/blog/diary.php?diaryid=10436
<<<[FLA]Slide Show update / 首页 / 永隔一江水---许巍>>> [code] Update: LoaderClass Due to a small bug in the recognition of MovieClip-targets, we decided to make the last beta alpha now. You still can use the old parameter style. I recommend the object style though. ... Instead of single parameters, all event-handlers take a reference to the current loaderObj now. You have to use getters, to retrieve the values you are interested it. Here are the available getters:
- isLoading()
- getBytesLoaded()
- getBytesTotal()
- getPercent()
- getStepBytesLoaded()
- getStepPercent()
- getKBLoaded()
- getKBTotal()
- getTime()
- getSpeed()
- getEstimatedTotalTime()
- getTarget()
- getTargetObj()
- getUrl() Please take a look at the API inside the as-file for the details. myLoader = new LoaderClass(); // activate the new object parameter style myLoader.setParamStyleObject(); // retrieve percentage using object style bar_mc.onLoadProgress = function( loaderObj){ this._xscale = loaderObj.getPercent(); } myLoader.addListener(bar_mc); myLoader.load( target_mc, "myMovie.swf" ;This new style offers a lot more flexibility. Moreover you don't have to remember how to calculate percentage or speed. Just use the appropriate getter and you are done. To provide compatibility with elder versions of the LoaderClass, this new style has to be activated explicitely. That's what the call to myLoader.setParamStyleObject(); is for. If you have used the last beta, you already know most of the changes. Just the setParamStyle-method has been replaced by two methods called setParamStyleSimple and setParamStyleObject. Posted by mojaves at | Trackback( 0 ) so help me to get where i belong......i love u Y tou....forever.hehehaha……………… 评论 想说的啥? 最后更新 Tori Amos - Caught a Lite Sneeze [MV] Perfect day. 高考以后……………… 哈狗的来历 今天高考 BlackConvoy[黑暗护卫] 我爱你,再见。 别让我一个人醉 步行,从新南门到电子科大东门 沉睡了也在笑