[FONT=Times New Roman][SIZE=3]I’ve been looking through documentation, and on the forums, and am hopelessly confused with some of the new things in AS3. I have tried include, import, and class paths to no avail. Anyway…[/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]Folder1 est.fla // test fla[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3]Folder1\Scripts\PhysicsEngine.as // class[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Class AS file:[/SIZE][/FONT]
class PhysicsEngine {
private var age:int;
public function PhysicsEngine(newAge:int) {
age = newAge;
trace("PhysicsEngine created.");
trace("age = " + age + ".");
}
}
[FONT=Times New Roman][SIZE=3]…and…[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]test fla, frame 1:[/SIZE][/FONT]
var myEngine:PhysicsEngine = new PhysicsEngine(10);
[FONT=Times New Roman][SIZE=3]Just what is wrong with this code? I have a class path set up which is supposed to be importing the “Scripts” folder into frame 1.[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]I also get a nasty error: Cannot open a protected movie.[/SIZE][/FONT]