PDA

View Full Version : [AS2] problem with game


louise88
02-23-2008, 05:46 PM
Hi,

I was just wondering if someone could help me. I am making a game in flash where you have to click on groups of 2 or more blocks of the same colour to make them disappear. I have managed to get the game to work.

BUT. as well as the score and the actual game, i have a play again button. On clicking the button i would like a sort of pop up box to appear infront of the grid which just displays some text. However, despite putting this pop up window on the layer above the "game," the grid is still showing in front of it.

I changed the position of the pop up window to test if the button to it works and it does, its just displaying behind the grid.

Any suggestions would be great :)

ASWC
02-23-2008, 05:49 PM
There's no bug in this cases, your grid appears in front because it's in front. The layer where the grid is, is above the layer where the popup is.

louise88
02-23-2008, 05:52 PM
There's no bug in this cases, your grid appears in front because it's in front. The layer where the grid is, is above the layer where the popup is.

I've checked the content of the layers and the game grid is definitely on the layer below the popup... :s

ASWC
02-23-2008, 05:54 PM
can you show your code then, you maybe changing the depth dynamically somwhere...

ASWC
02-23-2008, 06:11 PM
myPlayAgainButton.onRelease = function(){

myPopUp.swaptDepth(200);


}

louise88
02-23-2008, 06:37 PM
i couldn't get the pop up to appear...but i don't know if i've coded this correctly

again_btn.onRelease = function()
{
gotoAndStop ("again");
again_mov.swaptDepth(200);
}

Also, i was wondering if there was any reason you used 200?

ASWC
02-23-2008, 06:39 PM
I don't always remember keywords. that was a typo.

again_mov.swapDepths(200);

louise88
02-23-2008, 06:53 PM
for some reason it's still not working... thanks for your help though :)

ASWC
02-23-2008, 06:59 PM
try:

again_mov.swapDepths(mc);

louise88
02-23-2008, 07:28 PM
Ok, so what i have is:

again_btn.onRelease = function(){
gotoAndStop("again");
again_mov.swapDepths(mc);
}

and it stil doesnt work...i put it in the same frame as the other actionscript.