# Project flash

**URL:** <https://forum.kirupa.com/t/project-flash/258842>\
**Category:** Uncategorized\
**Created:** [April 28, 2008, 8:27pm UTC](https://forum.kirupa.com/t/project-flash/258842 "2008-04-28T20:27:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mozes](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@mozes](https://forum.kirupa.com/u/mozes)\
**Post date:** [April 28, 2008, 8:27pm UTC](https://forum.kirupa.com/t/project-flash/258842/1 "2008-04-28T20:27:32Z")

</div>

Hello, i am a student, and for a project I have to make minesweeper!  
This is my code to create the playfield, but the problem is when I click on a square, i don’t get the wright value wich is under it. So i have made a movieclip square with a dynamic textbox in it. And when I click on a square, the wright value from the array must appaer!  
 ![]() ![]() ![]() ![]() ![]() ![]()  
 ![](http://img507.imageshack.us/img507/2558/minesweeperol1.th.jpg)

var wortel:Number=Math.sqrt(combobox\_input.text);  
var rowposition:Number = 0;  
var ar:Array = maakVeld(txt\_input.text, wortel, wortel);

for(i=0;i\<wortel;i++){  
for(j=0;j\<wortel;j++){  
var clip:MovieClip = \_root.attachMovie(“square”,“square\_mc”+rowposition,rowposition++);  
clip.\_x = 250 + j \* 26;  
clip.\_y = 150 + i \* 26;  
clip.onRelease = function(){  
this.\_alpha = 50;  
var teller:Number = 0;  
for (var z:Number = 0; z\<ar.length; z++) {  
for (var q:Number = 0; q\<=wortel; q++) {  
if(teller == this.\_name.substr(9,this.\_name.length)) {  
this.displayText.text=ar[z][q];  
break;  
}  
teller++;  
}  
}  
}  
}  
}
