- Age / Gender:
- 23, Male
- Location not disclosed
- All Stats >
- Community Stats
Level 5 Game Developer
Ranked as Civilian
Contact Info / Websites
I've made an actionscript console for you to control your flash games directly! (kinda like the cheat console that pops up when you press some key in half Life or halo)
You type your actionscript commands into the line, and you can tell your game objects to do whatever functions, set whatever property on your game objects or even create new instances of objects!
This makes your debugging a whole lot easier
Here, download and try out this swf to see what I mean:
In the swf file, there is a Console. Press the ` key to make it appear or dissapear.
Type your commands into the line below the top rectangle. where it says "root::". press enter to execute.
Below the console, there is a box. You can experiment with it by typing:
root.box. x = someNumber;
root.box.rotation = someDegrees;
You can also spawn stickMen by typing:
root.manX = new Man('name'); e.g "jon";
root.addChild(root.manX); will add the man to the stage.
Now you can make your man do stuff by typing:
root.manX. jump(); //man jumps
root.manX.kill();//kills the man
root.manX.say ('whatever you want');// makes the man wave and say whatever you want
you can also create a variable and store 'whatever you want anywhere', and then have your man say the variable.
root.manX.sayStuff = 'whatever you want';
var manSays = 'whatever you want'
Finally, if you are game, you can try typing this:
and the man will walk left every frame!
You can also access the Man class and perform its static functions:
Man.listMen();//traces to the console the names of the men you have created
Man.allJump();//causes all the men on the stage to jump
Try whatever you want and let me know what you think!
You can download the fla file for the console here CS5.5:
You can download the code that makes the console work here:
Its in a folder called Pasv2. The folder has the documentation telling what you can do with the code files.basically, the AS files allow you to execute and load Actionscript variables from a string containing actionScript, and you can also save your game objects into actionScript as well!
To include the files into your project, paste the folder into your project folder and then type :
import Pasv2.* into your game code. And follow the instructions in the documentation.