So simple you wouldn’t believe, but it just refuses to work, here’s my code:
package {
import flash.display.*;
import flash.net.*;
public class Gameloader extends MovieClip{
public function Gameloader() {
var request:URLRequest = new URLRequest("Elf_game.swf");
var loader:Loader = new Loader();
loader.load(request);
addChild(loader);
}
}
}
The above code is the main document class of my loader file, there’s absolutely nothing else to the file at all.
I get the following errors:
1061: Call to a possibly undefined method load through a reference with static type Loader.
1067: Implicit coercion of a value of type Loader to an unrelated type flash.display:DisplayObject.
I just don’t get it, I’m obviously doing something wrong.
Please help me!!
Thanks