Copy link to clipboard
Copied
Trying to learn how to crerate a Box2D game in WIndows 8 Flash Pro CC. Opened new document in ActionScript 3.0 Class or ".as" as a Flash Pro application. Very very new to all developer languages and processes. Please help.
package {
import flash.display.Sprite
import Box2D.Dynamics.*;
import Box2D.Collision.*;
import Box2D.Collision.Shapes.*;
import Box2D.Common.Math.*;
public class Main extends Sprite{
public function Main(){
trace(*my awsome game starts here *);
}
}
}
Copy link to clipboard
Copied
if that's saved as Main.as in the fla's default directory., there's no problem with the code you showed.
Copy link to clipboard
Copied
the default directory is usually in the same directory where the main fla is saved but that can be changed in advanced actionscript settings panel (file>publish settings>actionscript settings - wrench icon).
p.s. you should copy and paste your actualy code. if that is your actual code, that trace is incorrect and should contain a string. ie, change the asterisks to quotes.
Copy link to clipboard
Copied
Sir,
How do I save that code as main.as in the flas default directory if it is already saved as "main.as". WHat do I do after I click on the wrench?
V/R,
Gregor Ivenz
Copy link to clipboard
Copied
start by copying and pasting the code in Main.as and make sure that's Main.as, not main.as
Find more inspiration, events, and resources on the new Adobe Community
Explore Now