Support NATA 2014

ASSHOLELAASSHOLELA

Main News Games Reviews Stats 12 Fans
Follow ASSHOLELA
ASSHOLELA
Age / Gender:
20, Male
Location:
Location not disclosed
Joined:
12/2/07
All Stats >

User Statshot

Community Stats
Level 5 Game Developer
Normal Whistle
Ranked as Civilian

Contact Info / Websites

Latest News


Hi guys,
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:
http://www.newgrounds.com/dump/item/b711afda7494 d702e843324e6f3f9aff

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;
root.box.graphics.LineStyle(someThickness);
root.box.graphics.lineTo(someX, someY);
root.removeChild(root.box)
etc etc...

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';
root.manX.say(root.manX.sayStuff);
or
var manSays = 'whatever you want'
root.manX.say(manSays);

Finally, if you are game, you can try typing this:
import flash.events.Event;
root.manX.addEventListener(Event.ENTER_FRAME,roo t.manX.walk);

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:
http://www.newgrounds.com/dump/item/d538261f3c0c e35ff5f1f74c06da574b

You can download the code that makes the console work here:

http://www.newgrounds.com/dump/item/c4aee0c09097 b65241470ec1e8a598d0.

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.

Cheers!