mercredi 5 avril 2017

Am I developing a game in as3 memory?

Wanted to know how to make a memory game in as3 where you first have:

1-every time the game runs the cards are random.

2-Have at least one condition to verify that the cards are the same and if they are to disappear.

3- if the cards are not equal return to normal

4-all just with a movieclip that contains in the frames the cards

Thank you for understanding

I have this code so far:


//variáveis relativo ao score, pattern and so on
var pattern = new Array();
var buttons = new Array();
var position = 0;

//Dizer aos botões que esperam ser clicados pelo rato
a.addEventListener(MouseEvent.CLICK, Clicked);
b.addEventListener(MouseEvent.CLICK, Clicked);
c.addEventListener(MouseEvent.CLICK, Clicked);
d.addEventListener(MouseEvent.CLICK, Clicked);
e.addEventListener(MouseEvent.CLICK, Clicked);
f.addEventListener(MouseEvent.CLICK, Clicked);
g.addEventListener(MouseEvent.CLICK, Clicked);
h.addEventListener(MouseEvent.CLICK, Clicked);
i.addEventListener(MouseEvent.CLICK, Clicked);
j.addEventListener(MouseEvent.CLICK, Clicked);
k.addEventListener(MouseEvent.CLICK, Clicked);
l.addEventListener(MouseEvent.CLICK, Clicked);
m.addEventListener(MouseEvent.CLICK, Clicked);
n.addEventListener(MouseEvent.CLICK, Clicked);
o.addEventListener(MouseEvent.CLICK, Clicked);
p.addEventListener(MouseEvent.CLICK, Clicked);

function Clicked(clickInfo:MouseEvent){
case a:;
case b:;

And I want you to click on any of the letters that you make appear any of the 4 objects that I decided

Aucun commentaire:

Enregistrer un commentaire