將對象傳遞給加載器的事件處理器的推薦方式是什麼?Actionscript:如何將對象傳遞給加載器事件
var l:Loader = new Loader();
var o:Object = new Object();
l.tag = o; // i imagine something like this
l.contentLoaderInfo.addEventListener(Event.COMPLETE, splashCompleted);
l.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, splashIoerror);
l.load(new URLRequest(path));
function splashCompleted(e:Event):void
{
// here i want to access the object o
}
謝謝,我只是想,AS已經內置了像C#等其他語言一樣的內置方式。 – clamp