【发布时间】:2011-07-29 06:21:08
【问题描述】:
我正在使用 HTTP 请求以二进制格式下载图像。下载完成后,我想处理它,但我也想将图像的ID传递给完整的处理函数......这是怎么做的?
var loader:URLLoader = new URLLoader();
for(var i:int = 0 ; i<5; i++){
/* When completed I want to access the variable "i" */
loader.addEventListener(Event.complete, completeHandler);
loader.load(/* a url request */);
}
private function completeHandler(event:Event):void
{
/* I want to access the passed parameter "i" so
it is the same as it was when the eventListener was added, 0,1,2,3 or 4 */
}
这可能吗?我试过扩展事件,但我想处理 COMPLETE 事件
谢谢 菲尔
【问题讨论】:
标签: apache-flex actionscript adobe