Search code examples
actionscripturlloader

URLLoader at Actionscript


At the URLLoader reference there is the following example:

       private function completeHandler(event:Event):void {
                var loader:URLLoader = URLLoader(event.target); 
       }

I cannot understand the URLLoader(event.target) syntax. It's not a call to the constructor, it's not a method invocation or a static method invocation. What is it?


Solution

  • It's a cast. In this example they are simply casting the event.target, which was a URLLoader as such.