temp.addEventListener(Event.COMPLETE, onComplete); private function onComplete(e:Event):void{ tf1.appendText((e.currentTarget as MyClass).vardata); }