yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Maze game in Flash


2m read
·Nov 3, 2024

Processing might take a few minutes. Refresh later.

Hey guys, this is Maad 101, and today we have a special guest, and he's going to show you how to make a maze game in Flash. I'm going to show you what I mean by that. Um, really quickly, we programmed this game, and um, if you lose, it'll play the "you lose" screen.

You have to keep your mouse in this um, white area, and if I go and I play properly, just hold on one sec, it'll say "I won." If I lose, if I lose by going in the pink area, it'll say "you lose." So now, um, our special guest is going to be showing you how to make this in Flash CS4. So let's get started.

Hi guys, uh, so I'm going to be using uh, ActionScript 2, not ActionScript 3. So, um, because I'm not going to draw out all this stuff for you, I'll just copy it from this file. Um, and so, if you just have this shape here, I'll convert it to a movie clip.

Um, and then I'll open up the actions and then write in "on rollover, gotoAndStop(2)," and frame 2 will be the um, the "you lose" screen. Okay? And um, for the wins, for the "you win" screen thing, I'll instead... I'm not going to write the text there, I'll just um, I'll just make a um, button here, and I'll convert that to a button.

I'll make it an invisible button by putting it on only the hit thing, not the up, over, or down, and it'll look blue, but in your actual exported Flash movie, you won't see it at all. So now I'm going to um, I'm just going to actually copy this and paste it in here and write "gotoAndStop(3)."

And so now I just need to write in um, I'll put a stop function in there so that it just stops the movie from playing the go, the lose or win. In frame 2, it'll say "you lose," and in this frame, it'll say "you win."

So now we test that. You should go here, and then if you roll over... hold on a sec. Oh, sorry, um, I forgot to put in the actions uh, that it says instead of "gotoAndStop(2)," it's "root.gotoAndStop(2)" because it's a movie clip. That's one of the disadvantages of movie clips.

Uh, yeah, but buttons, you can just write "gotoAndStop" and it should work fine. So now if I test this, if you roll over here, it says "you lose," and if you go over through the maze and roll over that part, it says "you win."

And uh, that's the end of this tutorial. Okay, so thank you for watching, and goodbye...

More Articles

View All
The Dark History of ChatGPT
The world was still coming to terms with the powers of the artificial intelligence chatbot called ChatGPT when GPT-4 was released in March of 2023. GPT-4 is miles ahead of GPT-3.5, the engine on which ChatGPT is running. At the time of writing, GPT-4 can …
The Rise of the Cali Drug Cartel | Narco Wars
[music playing] JIM SHEDD: Gilberto Rogriuez Orejuela and Miguel Rodriguez Orejuela were the heads of a cartel that was totally different than the other cartels. They looked at it more as a business to expand, and they were involved in the cost versus pr…
What are common scams I should be aware of?
So Grace, you know, and I’m asking both to protect all of us but also I have a strange fascination of exotic scams. What, what are the types of scams that you’ve seen? How, how elaborate have these things become? Yeah, so unfortunately the attackers are …
Theories Are Explanations, Not Predictions
There’s another example from science like this. On a heat source, put a beaker of water, then put a thermometer into that water and turn on your heat source. Then record, as the time passes, what the temperature of the water is. You will notice that the t…
INSIDE MY *FINISHED* CUSTOM BUILT LAS VEGAS HOME TOUR!
What’s up guys, it’s Graham here! So, for those who don’t know, about eight months ago I relocated from Los Angeles over to Las Vegas. In the process, I put down a deposit on the home you’re about to see today. Now, back then, I gave a tour of the unfinis…
Bobby Bones & Caitlin Parker Descend a Cliff | Running Wild with Bear Grylls
You got it? Yeah. All right. [dramatic percussion music] - [grunts] - Step. There you go. Good. This 200-foot descent down a canyon wall is all that stands between us and our extraction point. - Oh my god. But for newly engaged couple Caitlin Parker…