Well, I suppose this falls under the ‘Experiment’ category. If it’s in the wrong place… feel free to move it.
This forum game originated from the old old bit-101 lab forums and we used as2, and it was tons of fun over there… Never tried it with as3… hope you like it though.
Basically, we start with a base Actionscript code, and each new post, someone gets to add or modify a line of code. Hopefully, after a while we will have something cool (and probably very random too!).
Rules (READ THEM ALL PLEASE BEFORE CONTRIBUTING):
[LIST=1]
[]**When you reply to this thread, you get to modify or add [COLOR=Red]ONE[/COLOR] line of code.
[]If you wish, you can define a new function or class, but that counts as your one line, no putting anything in it in the same turn.
[]No inline if statements or other hacky code
[]No hugely long lines (more than 80 characters or so), keep your lines small and clean, and don’t use too many operations or functions.
[]Adding the required import statements does not constitute as a line.
[]Must compile with the flex SDK, as a Flash 9 document class or equivalent. Please CHECK your code before posting it.
[]You may only import packages in the flash. namespace. No mx.* or anything else.
[]The dimensions are 550x400, the framerate is 30fps. The background color is WHITE.
[]No [EMBED] directives (or whatever they’re called!)
[]If you add an eventListener, you may (must!) add the corresponding function so that the code compiles correctly…
[]All code must be contained in one ‘file’… no adding separate codes which must be contained in a separate file.
[]Please, in your post, describe what you changed or added!
[]You may (and should) include comments (maybe explaining what you are trying to do or want the next person to do?)
[/LIST]
note, I constructed and tested this with the flex 3 sdk compiling with FlashDevelop. Let me know if it needs to be modified to compile with other tools.
Popular things to use are the drawing API, bitmap data, and easy simple things like that.
Here is the starting code:
package
{
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite
{
public var thing:Sprite = new Sprite();
// NOTICE: YOU MAY NEED THIS, OPTIONAL
// [SWF(backgroundColor="#FFFFFF", frameRate="30", width="550", height="400")]
public function Main():void
{
addChild(thing);
addEventListener(Event.ENTER_FRAME, Update);
}
public function Update(evt:Event):void {
}
}
}
I will periodically compile it and post the current swf.
Now the next person adds a line, and the next, etc… Go!