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