Make Maze Games
1.Create new worksheet with the size of 400px X400px in Adobe Flash
2.Make a square size of 400 X 400 .And then give row in the middle of square
3.Selection in frame 1
4.Give games route ,you can use line tool to make it
5.Give colour in the outside route
6.Selection of all objects and then convert to a movie clip and name it "dinding". Then in the properties>
name instance name it "dinding".
7. Make a small circle, convert to movie clip and name it "pemain1".( use rectangle tool )
8. Make a small circle, convert to movie clip and name it "pemain2". (use rectangle tool )
9.Put circle in the end of route
10.Click in frame 1 ,and the choose action and typing script this below :
2.Make a square size of 400 X 400 .And then give row in the middle of square
3.Selection in frame 1
4.Give games route ,you can use line tool to make it
5.Give colour in the outside route
6.Selection of all objects and then convert to a movie clip and name it "dinding". Then in the properties>
name instance name it "dinding".
7. Make a small circle, convert to movie clip and name it "pemain1".( use rectangle tool )
8. Make a small circle, convert to movie clip and name it "pemain2". (use rectangle tool )
9.Put circle in the end of route
10.Click in frame 1 ,and the choose action and typing script this below :
stop();
r1 = pemain1._width/2;
r2 = pemain2._width/2;
//kecepatan pemain bergerak
kecepatan = 5;
onEnterFrame = function() {
//jika tombol
panah kiri ditekan
if
(Key.isDown(Key.LEFT)) {
//pemain1
dan pemain2 bergerak ke kiri
pemain1._x
-= kecepatan;
pemain2._x
-= kecepatan;
}
//jika tombol
panah kanan ditekan
if (Key.isDown(Key.RIGHT))
{
//pemain1
dan pemain2 bergerak ke kanan
pemain1._x
+= kecepatan;
pemain2._x
+= kecepatan;
}
//jika tombol
panah atas ditekan
if
(Key.isDown(Key.UP)) {
//pemain1
dan pemain2 bergerak ke atas
pemain1._y
-= kecepatan;
pemain2._y
-= kecepatan;
}
//jika tombol
panah bawah ditekan
if
(Key.isDown(Key.DOWN)) {
//pemain1
dan pemain2 bergerak ke bawah
pemain1._y
+= kecepatan;
pemain2._y
+= kecepatan;
}
//membuat
pemain1 tidak dapat melewati dinding
while (dinding.hitTest(pemain1._x,
pemain1._y+r1, true)) {
pemain1._y--;
}
while
(dinding.hitTest(pemain1._x, pemain1._y-r1, true)) {
pemain1._y++;
}
while
(dinding.hitTest(pemain1._x-r1, pemain1._y, true)) {
pemain1._x++;
}
while (dinding.hitTest(pemain1._x+r1,
pemain1._y, true)) {
pemain1._x--;
}
while
(dinding.hitTest(pemain1._x-r1, pemain1._y+r1, true)) {
pemain1._x++;
pemain1._y--;
}
while
(dinding.hitTest(pemain1._x+r1, pemain1._y-r1, true)) {
pemain1._x--;
pemain1._y++;
}
while
(dinding.hitTest(pemain1._x-r1, pemain1._y-r1, true)) {
pemain1._x++;
pemain1._y++;
}
while
(dinding.hitTest(pemain1._x+r1, pemain1._y+r1, true)) {
pemain1._x--;
pemain1._y--;
}
//membuat
pemain2 tidak dapat melewati dinding
while
(dinding.hitTest(pemain2._x, pemain2._y+r2, true)) {
pemain2._y--;
}
while
(dinding.hitTest(pemain2._x, pemain2._y-r2, true)) {
pemain2._y++;
}
while
(dinding.hitTest(pemain2._x-r2, pemain2._y, true)) {
pemain2._x++;
}
while (dinding.hitTest(pemain2._x+r2,
pemain2._y, true)) {
pemain2._x--;
}
while
(dinding.hitTest(pemain2._x-r2, pemain2._y+r2, true)) {
pemain2._x++;
pemain2._y--;
}
while
(dinding.hitTest(pemain2._x+r2, pemain2._y-r2, true)) {
pemain2._x--;
pemain2._y++;
}
while
(dinding.hitTest(pemain2._x-r2, pemain2._y-r2, true)) {
pemain2._x++;
pemain2._y++;
}
while
(dinding.hitTest(pemain2._x+r2, pemain2._y+r2, true)) {
pemain2._x--;
pemain2._y--;
}
};
And this my work
--------------------------------------------GOOD--------LUCK------------------------------------------
And this my work
--------------------------------------------GOOD--------LUCK------------------------------------------
ABOUTME
Hi all. This is deepak from Bthemez. We're providing content for Bold site and we’ve been in internet, social media and affiliate for too long time and its my profession. We are web designer & developer living India! What can I say, we are the best..










0 komentar:
Post a Comment