Jonas, your stars being behind the background problem is likely a simple one. Each time you call addChild that child gets added to the top of the display list. When we call addChildAt… it gets dropped where we tell it. You need your background to be on the absolute bottom. So add it first before anything else.
There's probably many other tutorials that shows how to do, but I'll do my own now. 1. Register First off you need a Mochiads account. You can get it from here: Link. Its a ref-link for me, but it doesn't change your earnings at all, and you're still nice to me Anyways, scroll down to where it says “for developers” and click “sign up now”. Register and then you can log in.
Now let's add code for each of the things described in the comments. First, it looks like we need an if/else statement to check whether the bee is flying or stopped, and do something appropriate in either case. We'll add that framework and adjust the comment indentation to match (adding a couple more comments to be a bit more specific):
The new First Impressions service from FlashGameLicense.com looks like a great way to smooth out those wrinkles in your games, without exposing it to the general public before a sponsorship. I've yet to try it out, but I certainly will be. Take a look.
[...] with No Comments That's right, part three of MichaelJWilliams's AS3 translation of the avoiding game tutorial series has been released (I have to say, I like your style Michael, Once an upgrade [...]
Thanks for the hittest help. One more thing. I've created a level where as you have to rollover a button in order to open another wall. Basically onrollover it shows level3-2, instead of just level3. Can I make my timer cary over from one level to another without restarting?
So, the last one was good an' fun, so let's have another crack at adding some polish to your games. Remember, polish can make a good game, great, and a lame game, not too bad. So it's worth doing y'know!
That concludes this portion of the avoiding game tutorial, click here to grab the source. As always, if you have any problems, requests or suggestions post them in the comments below or email me at alternateaccount[AT]frozenhaddock.co.uk
It's been a while since I've written anything, yes, but hopefully I can redeem myself with part 4 of the avoiding game tutorial! I'll be showing you how to make your enemies come from 4 different directions (and how to randomise which direction they move in each time) and also, thanks to egdcltd on the forums, how to randomise the size of your enemies. (I recommend you go and see the Avoiding game showoff thread on the forum, you'll see how others have taken the tutorial and modified it to their own needs, and a few little questions have been answered there too). Anyway, on with the tutorial!
This is part 5 of the avoiding game tutorial series, in which I have gradually shown you how to create an avoid and collect game. Make sure to read parts 1, 2, 3 and 4 before reading this, it'll all make much more sense that way!
In this Flash tutorial I will show you how to make a simple but yet smart dice roll game. This tutorial will cover a lot of simple programming issues, the use of buttons, make your own functions, make use of movie clip properties through actionscript, using simple math and random function an much more. I hope you enjoy it.
Line 43 now kills the player if it touchs the walls in a direction that is less of 300 degrees (or: in a range from 300 and 360 degrees). This means you have to pass the wall paying a lot of attention to your direction: the range of angles allowed are only 30 clockwise and 30 counter-clockwise, so the direction of the player must be very similar to the direction of the wall.
Line 1: I attach the "kira" object on the stage. Unlike in previous tutorial, I have no objects on the stage, I create them "on the fly" in this way. Why? Because I think it keeps the script cleaner. In order to do this, you need to select your object in the library window, right-click then "properties", then check "Export for Actionscript" and give it a name (in my case, kira). Look at these two screenshots:
Line 2: I attach the trail_sprite object (the one containing the movieclip with the shape) on a depth lesser than the hero's one (it will be behind the ball)
4. Now we have to repeat this for the left, right and top walls, I'm not going to make a description for them all, because its kind of the same as above, but here is the code.
then in the onclipevent (this event is raised repeatly) what this will do is to tell flash to move this._x and this._y (our ball) to its original posistion + the x,y speed variables.
what this does is if the ball hits joe then it will check if the life counter is more then 0 life left, if that is true then subtract 1 life, if life counter is less then 1 then the flash movie will jump to frame 2, where I placed a button called restart.
4. Now we want to make some point for this game, so double click the board movie clip from lesson 4 and make new dynamic text field as in the image below and type in 0 for the text, (as in 0 points), then name the text field "score_text".
This tutorial will teach Flash authoring techniques as well as programming in CS3. This tutorial is designed for simplicity and object oriented programming is not applied. The entire game is made with the Flash authoring timeline. Although I don't recommend this method, this is the quickest and easiest way to get a prototype of something working within hours. For a quick and easy game like Tic Tac Toe, programming in the timeline is ok. What is programming in the timeline? Read on and find out~
Once you draw your player (a birds eye of view of the player is best for this tutorial) Convert it to a movie clip by selecting it and right clicking and selecting convert to symbol. Make sure the registration is set to the middle. The name doesn't matter.
In this tutorial you will learn how to create a simple dodge game, this will help learn about hittesting, whilst allowing new flash developers to get a quick and easy game.
While this tutorial will not cover how to create a killer game like galaxian, tetris, or pacman, this tutorial will introduce you to the world of scoring in Flash. Click on the green and red circles in the following animation for an example of what you will create in this tutorial:
Use your arrow keys to have your character move and jump around. The space key fires your weapon once you have it. Since this is more of a case study than a tutorial, I will go ahead and provide you with the source to the above animation below:
If you’re a flash game developer you should know that in order to make a good game, you have to spend a considerable amount of time developing it. Usually, the time you spend making your game is analogous to the quality of game that you make. But, sometimes, the time you spend developing the game might not be worth the money you earn. Of course, if you make games as a hobby and don’t care about the profit, then this isn’t as important to you. But, for those who want the most for their time need to manage it efficiently. I shall show you a few steps that will help you in doing so.
That's some pretty intense code, eh? And you would have never thought that making a simple platform game would be so intense, right? Well, there's a reason why this tutorial is labeled “Advanced”.
Welcome to the third part of this tutorial. In this part, we're going to create the entire thing into a functional level. The first thing we're going to do is make the screen move along with the character, so it can actually move up the levels. Define this function at the end of your code:
Congratulations, we've just scored our game! That was the easy part. Now, we have to actually display what each bell is worth after hitting it. In order to do this, we're going to have to create a new MovieClip. The only thing that's going to be inside it is a dynamic textfield, and some code. Also, when you convert it into a MovieClip, Export it for ActionScript as mcScoreAdd, would you now?
The next bug we need to fix occurs after the mcFinalStats is shown on the screen. Whenever you click anywhere, mcMain can still jump. When it lands, another mcFinalStats is created. We can fix this no problem. Add an && !gameOver to the if statement in the mcBg's click function. That's all we need.
The basic concept of Winter Bells is to get as high as you can by jumping on bells. It's extremely addictive, and if you haven't, you should play it now.
Welcome, people, and get ready for yet another tutorial! In celebration of the winter season, we're going to make a game like Winter Bells, in ActionScript 3.0. Let us begin, shall we?
This tutorial will teach you how to create a Flash Lite game playable on the Flash Lite Player version 1.1 - one of the earliest versions and most restricted, but the most widely spread version as well. Our basic game could be created without using the advanced features provided in later versions. Adopting Flash Lite 1.1 will guarantee that the game will be compatible with the largest possible number of Flash Lite powered devices.
Before I begin explaining the code step-by-step, I'd like you to get the demo up and running yourself. The first step is to create a new Flash document, with which we'll associate the program's main class. Open up Flash and create a new document (File > New > ActionScript 3.0). Save this .fla file as 'SproingDemo.fla' (File > Save As). Bring up the Properties Panel (CTRL+F3), and under Document class, enter 'SproingDemo' (the name of the program's main class). If a warning dialog appears (as shown in the image below), just click OK.
I'm not quite sure what you mean by “play transition on second frame”; do you mean creating a fading animation between the preloader and your game's start screen?
32. In the Linkage Properties Box select Export for ActionScript. The Identifier should automatically fill with "simonSound1.mp3" if not, type that in.
The aim of the tutorial is to learn how to create a simple word game. You will create an input box which will give different results depending on what is typed. The code for this is quite straight forward and has many uses other than this word game. For example forms and password controls.