# Matching a figure and remove

**URL:** <https://forum.kirupa.com/t/matching-a-figure-and-remove/178119>\
**Category:** flash\
**Created:** [February 7, 2006, 8:28pm UTC](https://forum.kirupa.com/t/matching-a-figure-and-remove/178119 "2006-02-07T20:28:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bern494](https://avatars.discourse-cdn.com/v4/letter/b/a183cd/32.png) [@bern494](https://forum.kirupa.com/u/bern494)\
**Post date:** [February 7, 2006, 8:28pm UTC](https://forum.kirupa.com/t/matching-a-figure-and-remove/178119/1 "2006-02-07T20:28:55Z")

</div>

Hi All  
I am trying to create a game where random figures are revealed. These random figures relate to a list of monetary amounts on the same page. As a number is revealed the corrisponding amount on the page is then deleted, hopefully with a bit of fade, movement, jazzed up a little.

I cannot work out a code in order to do it. The code below is how I randomise the hidden amounts via a button.

on (release) {  
deck0 = “1p”;  
deck1 = “10p”;  
deck2 = “50p”;  
deck3 = “£1.00”;  
deck4 = “£5.00”;  
deck5 = “£10”;  
deck6 = “£50.00”;  
deck7 = “£100.00”;  
deck8 = “£250.00”;  
deck9 = “£500.00”;  
deck10 = “£750.00”;  
deck11 = “£1,000.00”;  
deck12 = “£3,000.00”;  
deck13 = “£5,000.00”;  
deck14 = “£10,000.00”;  
deck15 = “£15,000.00”;  
deck16 = “£20,000.00”;  
deck17 = “£35,000.00”;  
deck18 = “£50,000.00”;  
deck19 = “£75,000.00”;  
deck20 = “£100,000.00”;  
deck21 = “£250,000.00”;  
leng = 22;  
q = 0;  
while (Number(q)\<Number(leng)) {  
rand = random(22);  
if (eval(“deck” add rand) eq “empty”) {  
q = q-1;  
} else {  
set(“shuffle” add q, eval(“deck” add rand));  
set(“deck” add rand, “empty”);  
}  
q = Number(q)+1;  
}  
q = 0;  
txtDisplay0 = shuffle0;  
txtDisplay1 = shuffle1;  
txtDisplay2 = shuffle2;  
txtDisplay3 = shuffle3;  
txtDisplay4 = shuffle4;  
txtDisplay5 = shuffle5;  
txtDisplay6 = shuffle6;  
txtDisplay7 = shuffle7;  
txtDisplay8 = shuffle8;  
txtDisplay9 = shuffle9;  
txtDisplay10 = shuffle10;  
txtDisplay11 = shuffle11;  
txtDisplay12 = shuffle12;  
txtDisplay13 = shuffle13;  
txtDisplay14 = shuffle14;  
txtDisplay15 = shuffle15;  
txtDisplay16 = shuffle16;  
txtDisplay17 = shuffle17;  
txtDisplay18 = shuffle18;  
txtDisplay19 = shuffle19;  
txtDisplay20 = shuffle20;  
txtDisplay21 = shuffle21;  
}

The random amounts are hidden behind a button, when clicked reveals that amout.  
Thanks in anticipation  
Bern
