-3
想要知道如何在as3中製作記憶遊戲,您首先需要:我在as3內存中開發遊戲嗎?
1 - 每次遊戲運行時卡片都是隨機的。
2 - 至少有一個條件來驗證卡是否相同,如果它們消失。
3-如果卡不等於恢復正常
4 - 一切只與包含在卡
謝謝幀理解
一個影片剪輯我有這樣的代碼,以便遠:
import flash.events.MouseEvent;
//variáveis relativo ao score, pattern and so on
var pattern = new Array();
var buttons = new Array();
buttons.push(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
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){
trace("Clique");
switch(clickInfo.target){
case a:
clickInfo.target.gotoAndStop(2);
break;
case b:
clickInfo.target.gotoAndStop(3);
}
}
我也希望你點擊任何您所做的字母出現在任何的4個對象,我決定
謝謝你這個結果 –