Vote Trejo

vote trejo, originally uploaded by EdavidC.

Obama’s VP in 2010?  I hope so.  Danny Trejo is super cool.

Posted in art, film, Good Guys, Super Cool | Tagged | Leave a comment

Random Tile class

Here’s an Actionscript 3 class I wrote the places tiles on a grid – either randomly or in order, with no overlap, and allows for a tile free zone.

You can see it in action here.

/**
*     coding by mike Connor - flashDeveloper@rocketnumber9.org
*
*   randomly places tiles on a grid so that o not overlap and do not fall in dead tile zone
*/

package utils
{
    import flash.display.DisplayObject;
   
    public class RandomTile
    {
        private var numOfRows:uint;
        private var numOfCols:uint;
        private var rowArray:Array;
        private var tileArray:Array;
        private var unplacedArray:Array = new Array();
        private var _gridW:uint;
        private var _gridH:uint;
        private var _maginTop:uint;
        private var _marginLeft:uint;
        private var _deadTiles:Array = new Array();
        private var _randomLayout:Boolean;
       
        public function RandomTile(r:uint, col:uint,  ta:Array, gridW:uint = 76, gridH:uint = 76,
         maginTop:uint = 2, marginLeft:uint=1, randomLayout:Boolean= true, deadTile:Array = null)
        {
            rowArray = new Array();
            _randomLayout = randomLayout;
           
            numOfRows =  r;
            numOfCols = col;
            tileArray = ta;
            _gridW = gridW;
            _gridH = gridH;
            _maginTop =maginTop;
            _marginLeft = marginLeft;
            if (deadTile !=null) _deadTiles = deadTile;
            if (numOfRows * numOfCols < (tileArray.length - _deadTiles.length)) {
                  throw new Error("Error - too many tiles, not enough spaces");  
            } else {
                init();
            }  
        }
       
        private function init():void {
            for (var i:uint=0; i<numOfRows; i++){
                var colArray:Array = new Array();
                for (var j:uint=0; j<numOfCols; j++){
                    colArray.push(j);
                }
                //trace(" row " + i + " has " + colArray.length + " columns");
                rowArray.push(colArray);
            }
            removeOfflimitesTiles();
            if (_randomLayout){
                placeTilesRandomly(tileArray);
            } else {
                placeTilesInOrder(tileArray);
               
            }
        }
        private function removeOfflimitesTiles():void {
            for (var k:uint = 0; k< _deadTiles.length; k++) {
                //trace("dead row " + _deadTiles[k].row + " dead col " + _deadTiles[k].col);
                rowArray[_deadTiles[k].row][_deadTiles[k].col] = undefined;
            }
        }
       
        /* private function simplyPlaceTiles(arr:Array):void {
            for (var r:uint = 0; r < numOfRows; r++){
                for (var c:uint = 0; c < numOfCols; c++){
                    for (var i:uint = 0; i<arr.length; i++){
                        DisplayObject(arr[i]).x = _gridW* c) + _marginLeft;
                        DisplayObject(arr[i]).y = _gridH* r) + _maginTop;
                    }
                }          
            }
        }
         */

        private function placeTilesInOrder(arr:Array):void {
            var rowCount:uint = 0;
            var colCount:uint = 0;
            for (var i:uint = 0; i < arr.length; i++){
               
                var colArray:Array =rowArray[rowCount] as Array;
                var numColsinThisRow:uint = colArray.length;
               
                if (rowArray[rowCount][colCount] != undefined) {
                    DisplayObject(arr[i]).x = (_gridW* colCount) + _marginLeft;
                    DisplayObject(arr[i]).y = (_gridH* rowCount) + _maginTop;
                    Debug.trace_msg("    placeTiles in r:" + rowCount + ",  col:" + colCount, Debug.DEBUG_VERBOSE);
                    rowArray[rowCount][colCount] = undefined;
                   
                } else {
                    Debug.trace_msg("trace", Debug.DEBUG_VERBOSE);
                    arr.splice(0, i-1);
                    i= 0;
                }
                colCount++;
                if (colCount >= numOfCols){
                    colCount = 0;
                    rowCount++;
                }
               
            }
            Debug.trace_msg("DONE placeTiles in order", Debug.DEBUG_VERBOSE);
        }
       
        private function placeTilesRandomly(arr:Array):void {
            for (var i:uint = 0; i<arr.length; i++){
                var randomRow:uint = Math.floor(Math.random()*numOfRows);
                var colArray:Array = rowArray[randomRow] as Array;
                var numColsinThisRow:uint = colArray.length;
                var randomColinRow:uint = Math.floor(Math.random()*rowArray[randomRow].length);
                if (rowArray[randomRow][randomColinRow] != undefined) {
                    DisplayObject(arr[i]).x = (_gridW* randomColinRow) + _marginLeft;
                    DisplayObject(arr[i]).y = (_gridH* randomRow) + _maginTop;
                    Debug.trace_msg("    placeTiles in r:" + randomRow + ",  col:" + randomColinRow, Debug.DEBUG_VERBOSE);
                    rowArray[randomRow][randomColinRow] = undefined;
                   
                } else {
                    Debug.trace_msg("trace", Debug.DEBUG_VERBOSE);
                    arr.splice(0, i-1);
                    i= 0;
                }
            }
            Debug.trace_msg("DONE placeTiles", Debug.DEBUG_VERBOSE);
        }
    }
}

Posted in code, Professional | Tagged , | 1 Comment

Danny Trejo in Czech lawn mower commercial

What a bad ass.

Posted in video | Tagged | Leave a comment

Burning Man Film List

Here is a list of films that I think anyone going to or considering going to Burning Man should watch.

I’ll be adding more in the comments as I think of them.  I hope you will add to the list too …. but please do not list Wicker Man or Dune. Nuff said on that?

  • My Dinner with André
  • Babbet’s Feast
  • Sans Soleil
  • André Rubulov
  • ** Pink Flamingos, Female Trouble, just about any John Waters film
  • Santa Sangré
  • * The Good, The Bad and the Ugly
  • * Eraser Head
  • 1941

* perhaps too obvious but worth listing for the kids

** obvious but definitely worth listing for the kids.

Posted in Brain Blips, film | Tagged , | 4 Comments

My Other Card

CautionMike_Card - Safety FirstEvery year at Burning Man I meat a few people that I want to keep in touch with. So this year I made cards with my name, my picture, my art project, and my phone number. If we spoke for more than a minute, you got a card. I kind of over did it. I made 500 cards. Only 480 left to go. I thought of mooping the playa with the remainder just to see what sort of calls I might get…. but common sense won out.

If you are the lucky enough to possess one of these, you may turn it in for services. Ex: dipose of a body, bail out of jail, borrow money or wheels. (Each card is only good once.)

The photo on the other side (click to see) is by Mark Garlington who shoots a lot of the DPW (You built this city! It’s your fault!)

Posted in Brain Blips | Tagged , , , , | Leave a comment

Time Lapse of Burning Man

This is really well done.

Evolution (Burning Man time lapses) from Delrious on Vimeo.

Posted in video | Tagged , | Leave a comment

Brett James New Spy Thriller

Brett James, friend and collaborator on many stupidly large art projects, has written a spy thriller.

Posted in art | Tagged , , , | Leave a comment

Mike Ross opening – Off The Grid

Mike Ross opening - Off The Grid

Mike Ross opening – Off The Grid, originally uploaded by Caution Mike.
From one grid to another. After working on the Burninator Grid at Burning Man, I gave Mike Ross a little help with his new installation titled “Off the Grid“.

The show opens Friday, Sept 18, 7 pm.

414 Van Brunt

Brooklyn

Posted in art, Brooklyn | Tagged | Leave a comment

What Could Possibly Go Wrong?

Out at Burning Man this year, several us started bouncing around all the things that could go wrong at Burning Man.  We came up with a deliciously long list, but of course I’ve forgotten most of it.

Perhaps you can help me recreate the list. To make this specific, imagine some Burner dude…  2nd or 3rd year. Annoyingly enthusiastic… with big, big plans. The most killer art car, camp, bar etc.  Everything this guy does is motivated for the wrong reasons, i.e. to get laid and to become a legend in his own mind.

So… what could possible go wrong?

  • Missing 50 cent part that disables the whole project
  • hook up with hot chick reveals hidden candy
  • potato cannon backfires in face
  • food poisoning resulting in exploding diarheah
  • out house horrors
  • off hand comment about DPW goes out on radio for all of them to hear
  • loses all his drugs
  • finds drugs and accidentaly self-doses
  • camp blows down
  • runs from BLM who happen to be passing by. Gets mauled by canine unit.
  • finds 50 cent part on last day of event

Please add to the list

Posted in Brain Blips | Tagged | 3 Comments

The Flash Blog » Flash Builder rebrand FAQ

The Flash Blog » Flash Builder rebrand FAQ.

Posted in Professional | Leave a comment
  • Rocket Number 9

    Rocket 9 is the personal and professional online presence of Flash developer and citizen Mike Connor. Cloud Swing, Inc. is our software development shop.