# Arkanoid/breakout/brickles help

**URL:** <https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905>\
**Category:** Uncategorized\
**Created:** [July 2, 2004, 10:39pm UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905 "2004-07-02T22:39:52Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moopers](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Moopers](https://forum.kirupa.com/u/Moopers)\
**Post date:** [July 2, 2004, 10:39pm UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/1 "2004-07-02T22:39:52Z")

</div>

ok, i’m making an arkanoid/breakout/brickles game and i need help.  
I got the score counter working, i got the movement and everything working, but how do i make it so that if a variable is lower than 1(in this case, lives), it goes to another frame(which is the gameover screen).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 2, 2004, 11:25pm UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/2 "2004-07-02T23:25:09Z")

</div>

onclipevent(enterframe) {  
if(lives==0) {  
gotoAndPlay(2);  
}  
}

or something like this, just a quick start

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2004, 2:10am UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/3 "2004-07-03T02:10:18Z")

</div>

yes, that’s probably what i wanted but there’s one problem. “onClipEvent (enterFrame)”–\>do i have to put this on a movie clip?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2004, 2:26am UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/4 "2004-07-03T02:26:50Z")

</div>

no, you can take out the first and last lines and put it on the timeline

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2004, 4:07am UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/5 "2004-07-03T04:07:17Z")

</div>

hmm…doesn’t seem to work…i probably did something wrong.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2004, 12:34pm UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/6 "2004-07-03T12:34:30Z")

</div>

When you decrease the variable, check its value. No need to put it in an enterFrame 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2004, 2:10pm UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/7 "2004-07-03T14:10:21Z")

</div>

omg it still doesn’t work. i’ll post up the fla and please help me.(note: this version i have not put up the (lives==0)…)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2004, 4:50pm UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/8 "2004-07-03T16:50:41Z")

</div>

```auto
function wall_down() {
	if ((newy+radius)>=screenBottom) {
		_root.lives=_root.lives-1;
		if (_root.lives < 1) {
			trace ("End of the Game") ;
			this._parent._parent.gotoAndStop(2) ;
		}
		reactV();
	}
}

```

But you’ll also have to get rid of everything you’ve attached on the screen.  
By the way, very nice game 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2004, 9:17pm UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/9 "2004-07-03T21:17:15Z")

</div>

Yo thanks man(also to you bombingpixels)😃 iT’S so cool. now all i need to do is stop the ball from moving after the gameover pops up.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2004, 9:27pm UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/10 "2004-07-03T21:27:33Z")

</div>

hey do i really need that “trace” command? cause all it does is create an output. it works fine without it.

I made it so that if you lose the game, the ball is removed so you can’t get anymore points, i just need to bring the “gameover” textbox to the front. Any way to do that?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2004, 3:23am UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/11 "2004-07-04T03:23:54Z")

</div>

Put the textbox into a Movie clip and use a swapDepth(x) where x is a higher number than all the other clips depths on your screen. Or a MovieClip.getNextHighestDepth() might also work.  
Trace command isn’t needed for the code to work. It’s just for debugging. If you got many traces all over your code you can also say Omit trace actions in the publish settings and it will filter the traces out when compiling.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 4, 2004, 1:27pm UTC](https://forum.kirupa.com/t/arkanoid-breakout-brickles-help/114905/12 "2004-07-04T13:27:44Z")

</div>

k thx drcolossus

now i’m wondering how can i make more levels. for example when the first level is finished, you create another and keep on looping.
