question regarding as3 flashvars
Hello guys! I just have a question on how to use a flashvars.
I know how to use it when using a timeline method but I can't see the value that i'm passing when using "class" method.
Here is my code.
package
{
import flash.display.MovieClip;
import flash.net.URLRequest;
import flash.events.MouseEvent;
public class powerade extends MovieClip
{
public var face:mcFace;
public var test:mcTest;
public function powerade()
{
face=new mcFace();
addChild(face);
face.x=372.1;
face.y=246;
test=new mcTest();
addChild(test);
test.x=372.1;
test.y=450;
var flashvars1b=this.load.parameters;
var loader1b:Loader= new Loader();
loader1b.load(new URLRequest(flashvars1b.mainImage));
face.addChild(loader1b);
}
}
}
it returns an error :
| C:\wamp\www\powerade\src\powerade.as, Line 33 | 1046: Type was not found or was not a compile-time constant: Loader. |
| C:\wamp\www\powerade\src\powerade.as, Line 33 | 1180: Call to a possibly undefined method Loader. |
| C:\wamp\www\powerade\src\powerade.as, Line 32 | 1119: Access of possibly undefined property load through a reference with static type powerade. |
but when I tried to remove the code into red color, it works well.