Code: Select all
on openCard
   set the height of the templateButton to 30
   set the width of the templateButton to 30
   set the borderWidth of templateButton to 0
   set the shadowoffset of templatebutton to 0
   create group
end openCard
command makeBoard
   put fld "field" into rowCount
   put fld "field" into colCount
   add 30 to locStartX
   put 30 into locStartY
   lock screen
   repeat with x =1 to rowCount
      repeat with y =1 to colCount
         if locStartX is (30 * colCount + 30) then
            put 30 into locStartX
            add 30 to locStartY
         end if
         create button in first group
         put it into newButtonID
         put the long id of newButtonID into boardArray[x][y]
         set the loc of newButtonID to locSTartx,locstarty
         add 30 to locStartX
      end repeat
   end repeat
   unlock screen
end makeBoard
