Judul:Teka Teki Silang As3
Format: *.swf
Language:indonesia
By Ricko nada di Pustaka Flash terima kasih telah membaca :) Teka Teki Silang As3
Potongan script
import com.PustakaFlash.display.*;
import com.PustakaFlash.effect.*;
var menu:context = new context(this);
menu.addMenuItem(context.auto);
menu.addMenuItem(context.autoCopy);
menu.hideMenuItem(context.autoCopy);
menu.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menuFunction);
function menuFunction(event:ContextMenuEvent):void
{
switch (menu.selectedMenu)
{
case context.auto :
break;
case context.autoCopy :
var request:URLRequest = new URLRequest(context.autoWeb);
navigateToURL(request);
break;
}
}
var model:Vector.<*>=Vector.<*>([
"*","*","*","*","*","*","*","*","*","*","*","*","*","*","*",
"*","*","*","*","*","*","*","*","*","*","*","*","*","*","*",
"*","*","*","*","*","*","*","M","*","*","*","*","*","*","*",
"*","M","*","*","M","*","S","E","R","A","B","U","T","*","*",
"*","O","*","*","E","*","*","N","*","*","*","*","*","*","*",
"*","N","*","*","N","*","*","Y","*","*","*","*","*","*","*",
"*","O","*","*","J","*","*","I","*","*","*","*","*","*","*",
"*","K","O","L","A","T","E","R","A","L","*","*","*","*","*",
"*","O","*","*","R","*","*","I","*","*","*","*","*","*","*",
"*","T","*","*","I","*","*","P","A","D","I","*","*","*","*",
"*","I","*","*","*","*","*","*","*","*","*","*","*","*","*",
"*","L","*","*","*","*","*","*","*","*","*","*","*","*","*",
"*","*","*","*","*","*","*","*","*","*","*","*","*","*","*",
"*","*","*","*","*","*","*","*","*","*","*","*","*","*","*",
"*","*","*","*","*","*","*","*","*","*","*","*","*","*","*"]);
var nama:Vector.<* > = Vector.<* > ([]);
var no:Vector.<* > = Vector.<* > ([]);
var noSoal:Vector.<* > = Vector.<* > ([37,46,49,51,106,142]);
var nxt;
Effect.Bevel(wdhSoal);
proprties();
function proprties()
{
var idx= new kotak();
var arr:Vector.<*>=Vector.<*>(Grid.createGrid(model.length,15,0,0,(idx.width),idx.height,1,1,false));
for (var i = 0; i < model.length; i++)
{
if (model[i] != "*")
{
idx= new kotak();
Effect.Bevel(idx);
addChild(idx);
idx.x = arr[i].y;
idx.y = arr[i].x;
idx.label.text = "";
idx.no.text = "";
idx.id = i;
no.push(i);
nama.push(idx);
}
idx.buttonMode = true;
idx.mouseChildren = false;
idx.addEventListener(MouseEvent.MOUSE_DOWN,tmblIndex);
}
berinomor();
}
function berinomor()
{
var c = 0;
var b = 0;
while (b<noSoal.length)
{
nama[no.indexOf(noSoal[b])].no.text = c + 1;
c++;
b++;
}
}
this.addEventListener(KeyboardEvent.KEY_DOWN, myKeyDown);
function myKeyDown(e:KeyboardEvent):void
{
var character:String = String.fromCharCode(e.charCode);
var c:int = 0;
while (c<nama.length)
{
if (nama[c].bg.currentFrame == 2)
{
nama[c].label.text = character.toUpperCase();
nxt = c + 1;
}
c++;
}
}
function tmblIndex(e:MouseEvent)
{
kembali();
trace(e.currentTarget.id);
e.currentTarget.bg.gotoAndStop(2);
}
function kembali()
{
var c:int = 0;
while (c<nama.length)
{
if (nama[c] != null)
{
nama[c].bg.gotoAndStop(1);
}
c++;
}
trace(no);
}
btn.buttonMode = true;
btn.addEventListener(MouseEvent.MOUSE_DOWN,tmblCek);
function tmblCek(e:MouseEvent)
{
var c:int = 0;
while (c<no.length)
{
(nama[c].label.text == model[no[c]])?nama[c].bg.gotoAndStop(3):nama[c].bg.gotoAndStop(4);
nama[c].label.text = model[no[c]];
c++;
}
}
ada yg scrip semacam game cari kata
ReplyDelete,,?? bth bgt nih mass
:v coba lihat disini semoga membatu :D
Delete/2013/03/game-search-word.html
Asalamualaikum. Master ada ngak game tts nya kyak gini yg as2. Terima kasih. :)
ReplyDeleteAda saya pernah buat,.... :)
Delete