I'm trying to create a huge grid of white squares on a black background, so that randomly, the white squares flickering on and off. I have specific measurements that it has to be and I can't alter that size at all. Any suggestions.
Draw your square and turn it into a movieclip, making sure to make it available to actionscript (forget the exact text, but there is another checkbox and name field that must be filled out). Then write a loop that places all of the squares on the stage. Then, depending on the desired effect (can more than one be turned "off" at a time?) I would set an interval for each square right there in the loop to randomly turn it off. Then in the fiction called to turn it off, set another interval to turn it back on (either at a set rime or a random one).
var squareWidth : Number = 30;
var gridWidth : Number = 500;
var gridHeight : Number = 400;
var grid : Sprite = new Sprite();
var gutter : Number = 5;
var offSquare : Shape;
var timer : Timer;
var blinkRateInMilliseconds : Number = 500;
var numSquares : int;