The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled ActionScript Code
Posted by: finaiized | July 12, 2009 @ 7:14pm
ActionScript Code
[
Download
]
var letters:Array = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' ] function getRandomLetter():String { var randomIndex:uint = Math.floor(Math.random() * letters.length); return letters[randomIndex]; } import fl.controls.Button; var i:uint = 0; var j:uint = 0; var posX:uint = 0; var posY:uint = 0; var buttonSize:uint = 50; while(posY < stage.stageHeight) { posX = 0; j = 0; posY = i * buttonSize; while(posX < stage.stageWidth) { posX = j * buttonSize; var b:Button = new Button(); b.setSize(buttonSize, buttonSize); b.move(posX, posY); b.label = getRandomLetter(); addChild(b); j++; } i++; }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.42 / 8
106 Votes
http://codebin.yi.org/327
page generated in 0.00 seconds