Do you have another class, function or variable called Loader somewhere in your app?
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of NileAge, Mail Sent: Friday, February 15, 2008 5:00 AM To: [EMAIL PROTECTED]; 'Flex Components'; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [flexcoders] Loader.load() Error Hello all, I'm trying to execute this example but appear the error message (Call to a possibly undefined method load through a reference with static type Loader ). I'm using Flex 2. Plz tell me what is the problem? ------------------------------------------------------------------------ ---------------------------------- import flash.display.*; import flash.display.Loader; import flash.display.Sprite; import flash.events.*; import flash.net.URLRequest; public function Loader11():void { var rect:Shape = new Shape(); rect.graphics.beginFill(0xFFFFFF); rect.graphics.drawRect(0, 0, 100, 100); addChild(rect); var ldr:Loader = new Loader(); ldr.mask = rect; var url:String = "http://www.unknown.example.com/content.swf"; var urlReq:URLRequest = new URLRequest(url); Error --->> ldr.load(urlReq); addChild(ldr); } ------------------------------------------------------------------------ ---------------------------------- Thanks Abdullah Abdelhay
