Anda di halaman 1dari 3

ACTIVITY- SCENES AND BUTTONS

Creating Scenes:

How to create a new scene?


 Go to the Window then Design Panels and click the Scene then add (+).

1. Create 7 scenes. (main, main2, stage


1, stage 2, extra game,you won, game
over)
2. Each scenes, create new layer and
named it label. On the properties, type
it’s frame label. (Ex. main, main2,
stage1,stage2, extragame, youwon,
gameover)
3. Create new layer each and named it
action. Type stop(); on its action script.

SCENE 1 (main)

1. Create new layer and draw a


rectangle.
2. Convert it to button. Go inside and
create a static text which is “Play”.
3. Type the following script on the action
panel of the Play button:
on (release) {
_root.gotoAndPlay("main2");
}

SCENE 2 (main2)

1. Create new layer and draw a two rectangle.


2. Convert it to button. Go inside and create a
static text which is “Game1” and “Game2”.
3. Type the following script on the action
panel of the:

Game 1 button
on (release) {
_root.gotoAndPlay("stage1");
}
Game 2 button
on (release) {
_root.gotoAndPlay("extragame");}

1. Create your game.


2. After you create your own game, we will now focus on the portal and key. Create a portal
and convert it to movie clip. Type this following script:
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
if (_root.key.got == 1) {
_root.gotoAndStop("stage2");
}
}
}
3. Create a key and convert it to movie
clip. Type for an instance name “key”
Type this following script:
onClipEvent(load) {
got = 0
}
onClipEvent(enterFrame) {
if(_root.char.hitTest(this)){
this._alpha = 0;
got = 1;
}
}

SCENE 4 (stage2)

1. Create your scene 2 with the continuation of your game.


2. Same process based on scene 3.
3. For the door:

onClipEvent (enterFrame) {

if (_root.char.hitTest(this)) {

if (_root.key.got == 1) {

_root.gotoAndStop("youwon");

}
SCENE 5 (extragame)

1. Create your another game.


2. To go to “game over and you won”, do the same procedure from the above.
3. But don’t forget to change the next destination in action script.

SCENE 6 (youwon)

1. Create a static text “You won!”.


2. Copy paste the format of score in your
game.
3. Create a button “Main Menu”. Type the
following in action script:

on (release) {

_root.gotoAndPlay("main");

SCENE 7 (gameover)

1. Create a button “Play again” and


“Main Menu”.
2. In “Play again”, type the following
action script:
on (release) {
_root.gotoAndStop("stage1");
}
3. In “Main Menu”, copy paste the
action script to scene 6.
4. Copy paste the format of score in
your game.

Anda mungkin juga menyukai