<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on snippet: 'AS3: Create a grid of bottons'</title>
<link>http://snipplr.com</link>
<description>Snipplr comments feed'</description>
<language>en-us</language>
<pubDate>Wed, 22 May 2013 10:09:21 GMT</pubDate>
<item>
<title>vel said on 9/13/10</title>
<link>http://snipplr.com/view/7366/as3-create-a-grid-of-bottons/</link>
<description><![CDATA[ 1.
      private function generateBoard(startX:Number,startY:Number,totalRows:Number,totalCols:Number,buttonSize:Number):void {
   2.
      buttons = new Array();
   3.
      var colCounter:uint;
   4.
      var rowCounter:uint;
   5.
      for(rowCounter = 0; rowCounter < totalRows; rowCounter++) {
   6.
      for(colCounter = 0; colCounter < totalCols; colCounter++) {
   7.
      var b:Button = new Button();
   8.
      b.x = startX + (colCounter*buttonSize);
   9.
      b.y = startY + (rowCounter*buttonSize);
  10.
      b.addEventListener(MouseEvent.CLICK, letterClicked);
  11.
      b.label = getRandomLetter().toUpperCase();
  12.
      b.setSize(buttonSize,buttonSize);
  13.
      b.name = "buttonRow"+rowCounter+"Col"+colCounter;
  14.
      addChild(b);
  15.
       
  16.
      buttons.push(b);
  17.
      }
  18.
      }
  19.
      } ]]></description>
<pubDate>Mon, 13 Sep 2010 23:14:57 GMT</pubDate>
<guid>http://snipplr.com/view/7366/as3-create-a-grid-of-bottons/</guid>
</item>
<item>
<title>vel said on 9/13/10</title>
<link>http://snipplr.com/view/7366/as3-create-a-grid-of-bottons/</link>
<description><![CDATA[ <a href="http://snipplr.com/view/7366/as3-create-a-grid-of-bottons/">Code snippet - AS3: Create a grid of bottons</a> on Snipplr ]]></description>
<pubDate>Mon, 13 Sep 2010 23:14:42 GMT</pubDate>
<guid>http://snipplr.com/view/7366/as3-create-a-grid-of-bottons/</guid>
</item>
<item>
<title>nuthman said on 3/3/10</title>
<link>http://snipplr.com/view/7366/as3-create-a-grid-of-bottons/</link>
<description><![CDATA[ Nice! I have written a nice little class that builds a grid out of supplied display objects or class of your choice.. I have also explained the code so that you can get a foundation of how to start creating grids for building puzzle type games. Check it out: http://www.as3blog.org/?p=50 ]]></description>
<pubDate>Wed, 03 Mar 2010 05:32:08 GMT</pubDate>
<guid>http://snipplr.com/view/7366/as3-create-a-grid-of-bottons/</guid>
</item>
</channel>
</rss>