Showing posts with label Game. Show all posts
Showing posts with label Game. Show all posts

Tuesday, June 05, 2012

New Game: Binkos

I've just released a new game: Binkos.

Background.
Back in 2007 I started working for Gamesys, specifically in the Bingo team. After more than 2 and a half years of working and speaking only about bingo, bingo balls and bingo calls I decided to move companies.
My time in Gamesys was great, I met and worked with lots of nice people, many of them were really talented and to pay my respects I created Binko.
As you can see, some typical elements in a bingo game are there: 90 bingo balls, a dabber and a jackpot. The idea was to hit the jackpot to get a prize, randomly selected from 6 prizes (one for each member of my team).

Bingo is dead. Long live Binko!


Many people might think the game is just another Peggle's clone, however, I was actually inspired by Players Plinko, one of the first mini-games I worked on in Gamesys but I won't deny there's an obvious Peggle influence as well.


That was just over 2 years ago, so yeah, the game engine is a bit old already. 

Revamp.
Last year while having a chat with one of my current work-mates (Zuzanna Kucharska) I mentioned the game and talked to her about FlashGameLicense.
She started working on the graphics, I updated the code and a few months later we had Binkos ready to be sold.

 
Despite the fact she did a great job, the game couldn't get any bid higher than $500 with some bids as ridiculously low as $80.
This is an early stages video of Binko's game-play:

First there was only one background and the player would have 25 balls to start with. Later on we added particle effects, different backgrounds for the 5 different levels (from late night to early morning) and the number of balls changed to 7 per level, carrying over any balls not used in previous levels.
After about 6 months we tried the Quick Auction option with the same results. Pathetic low bids.
We couldn't sell the game, so, I decided to release it as a Games-Garden game.

Release.
The first site I uploaded the game to is obviously Games-Garden.
Now the game has been released in:
- Newgrounds.
- Kongregate.
- Mindjolt.
Some other websites have taken the file from Newgrounds already so the viral distribution has already started.
I'll be releasing a Mochiads version of the game soon and see how it goes.

Tech-talk.
Some of the 3rd party libraries I used in Binkos are Box2D library for the physics in the game. Tweener, as usual, for all other animations like the boat going from side to side, points update, etcetera. Flint Particles library for the particle effects when the ball hits the tokens. Playtomic for the game analytics. Leaderboards are from MochiMedia and of course I'm using CPMStar and MochiAds for in-game advertising.

Now, if you're curious about the game and haven't played it yet, go and play Binkos at Games-Garden.

Monday, November 07, 2011

New Game: Emotiblocks

Just had a quick look at my forgotten blog (yes, the one you're on now) and noticed it's been a while since I mentioned any of my works.

Well, I've been busy doing games and other experiments mixing many technologies as usual.
Anyway, I want to introduce you to my latest released game: Emotiblocks.

It's a match 3 type of game with power-ups and 1 minute levels.
If you don't feel like playing it now, maybe this video from early development stages will tease you enough to try it for yourself:



And if in case you feel like adding it to your site, just download the .zip file from Games Garden 'Games for your site'.

Sunday, August 07, 2011

Flash Games Event: Mochi London 2011

Mochi London 2011
Mochi London 2011 is a FREE 2-day Flash games event taking place on August 27th-28th, 2011 in central London.

It has been brought to you by members of the Mochi Media community, Mochi London will bring local and international people together to share insights and experiences about the Flash games market. We're calling at:

  • Flash game developers
  • Flash game artists and designers
  • Flash game publishers
Whether you live or work in England or anywhere else in the United Kingdom, or even elsewhere in Europe, this event will be well worth the trip. Mochi community members Chris Jeffrey (ChrisJeff) and myself are organizing the event, with support provided by Mochi Media.

Come and join us! it will rock!
The speakers include:
  • Iain Lobb (freelance Flash / ActionScript developer)
  • Stuart Allen (developer of Gravitee Wars)
  • Martine Spaans (Ubisoft, formerly of SPIL Games)
  • Michael Hudson (ActionScript developer, CodeHeads)
  • Merlin Gore (Flash developer, FlashGameLicense.com)
  • Mike Jones (Platform Evangelist, Adobe Systems)
Don't forget to register and find out more at the Registration Page.

Thursday, June 05, 2008

Games Garden public beta release

games-garden

Games Garden, has finally opened to the public after a week of private beta testing.
The website is still in beta so expect some minor bugs and take into account that some components will eventually be moved around; the casual games portal will be adding more and more features these coming days including free downloadable games and widgets.

Quoting from the site:
Welcome to Games Garden, a games portal which offers you the latest games that you can play, share, and bookmark for whenever you feel like taking a break and have some fun!

At the moment you don't need to register to play as any new visitor has 200 tokens which is enough to play many of their games :)
All the games are powered by MochiAds, meaning, are completely free to play and are good quality "sponsored" games.
Thanks to MochiAds, games developers are getting some extra cash from their work and effort which is helping the games developers community to grow up producing better quality games as they are now able to afford different tools to improve them.

If you want to know more about what Games Garden has to offer, check out the ABOUT US section.

salut!

Thursday, May 15, 2008

Tweener for games: Updating Amounts

Following up on the Tweener for games tutorials, this time we will see how to update amounts gradually using Tweener to make them look nice & smooth.

As an example we can see my game GAIA - Guess Who? where the score is updated gradually instead of in one step (immediately) adding more to the user's experience and making the game more playable and enjoyable. Trust me, these little details can make a difference ;)

Update amounts gradually using Tweener:
What I've got on stage is a dynamic textfield with instance name "txtScore".
To give it a value, we declare a variable called myScore:

var myScore : Number = 100;
txtScore.text = myScore;

If you run the movie, your txtScore shows 100.
Nothing exiting I know... :P

Because we need to update this amount when a certain event happens, then we add a button, we will call it mcAddBonus.
Now let's use tweener to update the score adding a 50 points bonus:

import caurina.transitions.Tweener;

var myScore : Number = 100;
txtScore.text = myScore;

mcAddBonus.onRelease = function() : Void
{
Tweener.addTween(this._parent, {myScore:myScore + 50, time:1, onComplete:function() { txtScore.text = Math.round(myScore); }});
}


Testing the movie, whenever we press our button after a second myScore updates by 50.
Still nothing special :(
but, how about if we use the tweener onUpdate parameter instead of onComplete?
the onComplete only updates our score when the tween has finished but as we saw on the previous example, onUpdate updates the value gradually before the tween finishes.
Let's change the code:

import caurina.transitions.Tweener;

var myScore : Number = 100;
txtScore.text = myScore;

mcAddBonus.onRelease = function() : Void
{
Tweener.addTween(this._parent, {myScore:myScore + 50, time:1, onUpdate:function() { txtScore.text = Math.round(myScore); }});
}



Sweet!
I must say I love Tweener, is a great tool :)
and this is the example:






salut!

Saturday, May 10, 2008

Flash Games Contest: 5th place

Gaia - Guess Who?
To be honest I was a bit too positive about this one and I was expecting to get one of the first 3 prizes, however, there were 200+ games and many of them were really good, so 5th place is not bad at all ;)

The contest: MochiAds & Gaia Online - Become a Rock Star.

Actually there were two categories:
- Rock Star Winners
- Gaia Audience Prizes

and my game Gaia - Guess Who? won the 5th place of the Gaia Audience Prizes category.

I must say my game Gaia - Guess Who? is not the best but I was positive because I actually participated with 3 games altogether:
- Gaia - Guess Who?
- Save the Ants
- Pawel & the Teutonic Castle
Anyway, I'm really happy I've won a prize on this contest :)

For more info check out the "Become a Rock Star" Flash Game Contest winners' page.

salut!

Tuesday, April 15, 2008

Tweener for games: Countdown

Last week I came back from holidays, I was back in my home country after almost 6 years since I left, that's why I couldn't update the blog...
Anyway, as mentioned before, I'll be writing some tutorials on how to use Tweener for games development, however, take into account that the code can be used on other applications as well...
The first "tutorial" is

Creating a countdown using Tweener

From my point of view, adding a countdown to a game helps to improve the playability as the user feels more challenged to finish certain task.
After reading Arthur Debert's Tweener Tips, I got the idea on developing further his "Poor's man timer":

Tweener.addTween(this, {time:0.3, onComplete: myFunction});

Right, so if we put it into a function, then we have:


var timeleft : Number = 30;

function tweenDown() : Void
{
trace(timeleft);
timeleft--;
Tweener.addTween(this, {time:1, onComplete:tweenDown});
}

tweenDown();


First we declare a variable called "timeleft" and set it to 30, so we will count down from 30 seconds to 0.
The function tweenDown() traces the updated "timeleft", decreases the timeleft value by one and using tweener it calls itself every second thanks to the onComplete parameter.

If we tide up a bit, we can add another function to trace the updated value of timeleft, then we have something like:

var timeleft : Number = 30;

function showTimeleft() : Void
{
trace(timeleft);
}

function tweenDown() : Void
{
timeleft--;
Tweener.addTween(this, {time:1, onUpdate:showTimeleft, onComplete:tweenDown});
}

tweenDown();


The function showTimeLeft() will trace the updated value of timeleft thanks to the parameter onUpdate and this allow us to do something else instead of only tracing; we can add a textfield (with instance name txtTime) to show us the updated timeleft value and the updated script would be:

var timeleft : Number = 30;

function showTimeleft() : Number
{
return txtTime.text = timeleft;
}

function tweenDown() : Void
{
Tweener.addTween(this, {time:1, onUpdate:showTimeleft, onComplete:tweenDown});
}
tweenDown();


Now, the problem is that when the countdown reaches 0, it doesn't stop!
so we can add another function to check if there's any "timeleft" and if there isn't, then do something else. The final script for a simple countdown is:

import caurina.transitions.Tweener;

var timeleft : Number = 30;

function showTimeleft() : Number
{
return txtTime.text = timeleft;
}

function tweenDown() : Void
{
Tweener.addTween(this, {time:1, onUpdate:showTimeleft, onComplete:countDown});
}

function countDown() : Void
{
if(timeleft > 0){
timeleft--;
tweenDown();
} else {
trace("GAME OVER!");
Tweener.removeAllTweens();
}
}

tweenDown();


and this is the example:




Salut!

Wednesday, March 12, 2008

Overload Studios website update


First of all, I still haven't got internet at home. Why? well, whenever my girlfriend allows me to turn on the computer, I don't want to spend my time checking my email, forums, blogs, etcetera; I prefer to work! :)
These days I've been working on my games, updating old games and creating new ones and to promote them, I have updated my old website Overload Studios.
Last time I updated the site was back in 2003! almost 5 years ago, so definitely I had to do something about it and do it fast so that's what I did:

Homepage:
- Took a component from AFComponents.
- Followed a tutorial in Spanish from Infected-FX (Gracias wey!)
- Added some of my widgets
- Added google ads, analytics, etc.
and voila!

Games Pages:
- Games and other swf files embedded using swfobject
- Added some of my widgets
- Added google ads, analytics, etc.
and bingo!

my site has many more visits now; definitely a clean, clear and fresh design helps you to get more visits :)
Of course I would love to have something more complex, having a rating system, allowing users to leave comments (that I can use as feedback to improve my games...) etcetera but at least the first step is done ;)

salut!

Wednesday, February 06, 2008

Widget: Piranha Loca

As I mentioned before, I had the idea of working on a game-widget or a widget-game or whatever you want to call it...
And there it is, a widget called Piranha Loca, available at this moment only from Widgipedia as a web widget but I'm planning to add it to different widget distributors and have it available as a desktop widget as well.
Again I've added MochiAds to the game so I can get some revenue out of the long hours that took me creating it :)



Salut!

Monday, January 07, 2008

Hallpass games deal


If you want to monetize from a game you have developed, apart from adding MochiAds and submitting your game to MindJolt as I did with La Cucaracha, you can look for a sponsorship.
There are many games portals out there that, if your game is good, would be happy to pay you some money if you change/add this or that to your game, however, the best deal I have found so far is the Hallpass Developer Top Score Special.
The idea is to make your game compatible with their top-score system and you do that adding just one line of code.
I added this line of code to my game Slippery Pong and submitted it to Hallpass, when my game was accepted and added to the portal, I've got an email from Hallpass letting me know the $50 had been paid to my paypal account :)

Bill, from Hallpass says:

...I have been a full time web master (for games portals) for almost 10 years now.
The reason why I have been able to stick around this long is because I "work with" developers. Not simply sponsor games which I think will get the most hits back to hallpass. As you can see many of our games get passed up by other portals, on hallpass I try and work with up-and-coming developers in the hopes they remember us after they make their first big hit and allow us to work with them on it. I dont get the max value of every game I sponsor but when you add up all the developers together hallpass offers a great package, and helps promote unknown talent.


Hallpass allows your game to have MochiAds so you get money from both your adds and from their sponsorship. I think is a great deal!

Now go and check out Hallpass and don't forget to vote for Slippery Pong ;)

salut!

Friday, December 28, 2007

La Cucaracha in MindJolt

The idea of having a widget to do marketing for a game didn't work much; after joining MochiAds to get some revenue from my games, the thing was going a bit slow...
I still haven't lost my hopes on using widgets to do some marketing though but definitely the way to go is to distribute your applications EVERYWHERE.
For the last year I've been building widgets and uploading them into different distributors, trying not to upload the same widget to more than one distributor; however I don't think it was the best option.
The more distributors show your widget, the more users...
Now, going back to the game "La Cucaracha", I decided to send it to some game distributors, including NewGrounds, where the game did so so and I had some views that generated some small profit (around $1 :D )...
A couple of days ago, I got and email from MindJolt telling me that they had accepted my game and after a small amend should go live; I did the changes and the game went live yesterday and...
HURRAY!!!!
I had almost 50K views in one day only!
the reason?
MindJolt has a really cool Facebook application where people are encouraged to play games and compete with their friends to see who has the highest score...

GREAT!
that encourages me to keep on developing games, although I shouldn't leave widgets on a side, so the next one will be a game widget! :D



Thanks MindJolt!
and of course, thanks MochiAds!

salut!

Friday, December 07, 2007

Widget: Roaches

Roaches is a widget I built some time ago and put it on yourminis but didn't think it will be successful at all, however seems like its a bit popular as so far has more than 1200 installs.

I've made some minor updates as the cockroaches were a bit slow but the biggest reason for the update (and for this post) is because this widget has now a new purpose: Marketing.
I've added a small "play game" button as a "call to action" to any person watching at the widget; the widget itself has some sort of interactivity as the cockroaches react to the mouse pointer, but I'm promoting the update of La Cucaracha, a game I made long time ago and these days I've been working on it (but haven't managed to upload the latest update as I cannot connect to my server... :( )
Anyway, here it is:



Might be a bit naughty from me adding something to a widget that has been in the wild for a while but at the end of the day, as soon as my widget doesn't have any sponsor, I'm its owner and I can do the changes I want (changes that won't change much the nature of the widget though).
erm... this of sponsors sounds more like in the gaming industry as when you build a game, you can go to online companies that can buy it from you or sponsor it in any way; I think we are missing this in the widget industry.

Anyway, yes, I'm back to the gaming industry as from last month I started a new job as a Flash Developer for an Online Games company in Central London. As well I moved houses and I haven't got internet at home yet, that's why this blog has been a bit quit these weeks...

salut!

Sunday, September 16, 2007

Widget: Breakout-mini

This is the "widget version" of the Breakout game I did some time ago.
I submitted it to Google Gadgets and I must said, it was again a big pain!
I really thought that it will be easy this time but no way, finding the right page to do all the things its a nightmare, creating the elements and editing the xml file is another big headache...
Anyway, here it is:


if you want to put it on your website, get the code from this page.

Hopefully this widget will be very popular and I will be able to ask Google for $5,000 grant to improve it :)

salut!

Sunday, May 27, 2007

Game: Breakout

It's been a while... I haven't had time to post anything recently, even though I've had many interesting things to talk about, for instance I went to Mike Downey's presentation on Apollo at the London Flash Platform Users Group where I asked him if there would be any support from Apollo to Actionscript 2 and seems like they will stick with the Actionscript 3 support that it has already.
Well, anyway, as my fiancée went to Poland for the weekend, I had time to play a bit with the Tweener class and to finish up this game: Breakout.

I know it doesn't have levels or anything special but I like it :)

salut!

Sunday, February 18, 2007

Game: Blitzkrieg - Lightening War



I was following a tutorial on Creating a Vertical Shooter that I wrote a while back (more than a year ago)
- creating-vertical-shooter-part-I
- creating-vertical-shooter-part-II
- creating-vertical-shooter-part-III
When I wrote it, I made Pawel and the Flying Dragons; this time I made a new game:
Blitzkrieg - Lightening War

The actionscript I used is basically the same, just changed the graphics and added a couple of things like a shotgun and an enemys bomb. This is a probe that any script can be re-used and it has to be made thinking about it, some basic rules in Object Oriented Programming (Polymorphism and Inheritance).

The scoretable is almost empty so, go for it ;)

PD: Don't ask me what's that of a tank shooting anti-aircraft, hey! at least this time there are no flying dragons...

Monday, January 09, 2006

Creating a Vertical Shooter (Part III)

Pawel shoots arrows, moves and there is a beautifull background, but Pawel is shooting to an empty sky!
We need the dragons.
Again, as we did with the arrow, background, etc. we need to draw our dragons, I drew mine first using Freehand and then pasted into flash.




At the moment it will be a still image, although we can make a little animation of its wings.
We don't need instances of our dragon on the stage but we need it in the library as a movieclip.
Open the library and right click on the dragons movieclip to open the linkage properties window, tick Export for Actionscript and leave the identifier as default (dragon).
Now the actionscript.
The first three new things to be added are the variables:
var dragons:Number = 3;
var i:Number = 0;
var score:Number = 0;
dragons is the number of dragons we will have on the stage.
The variable i is a bit difficult to explain as is going to help us in more than one thing, i.e. to give a specific name to each dragon.
score is to store our score, we can add a dinamic text box on the stage with variable name score so we now how good we are killing dragons.
We need to add two functions, one to initialize the dragons and another one to update them.
function initDragons() {
for (i; i<dragons; i++) {
attachMovie("dragon", "dragon"+i, i);
dragon = _root["dragon"+i];
updateDragons(dragon);
dragon.onEnterFrame = function() {
if (this.hitTest(arrows)) {
score += 5;
trace(score);
arrowActive = false;
removeMovieClip(arrows);
updateDragons(this);
}
if (this._x>0) {
this._x -= this.velo;
} else {
updateDragons(this);
}
};
}
}
initDragons();
function updateDragons(which) {
which.gotoAndStop(random(4));
which._x = random(100)+530;
which._y = random(80)+20;
which.velo = random(10)+2;
}
In the function initDragons() , we start with the loop for (i; i<dragons; i++), usually this sort of loops look the same, with a variable to initialize the loop, the condition to loop and the incrementation of the variable value after each loop iteration.
when the value of i is less than the number of dragons, we will attach an instance of our movieclip dragon with this script:
attachMovie("dragon", "dragon"+i, i)
The new name of this instance is "dragon"+i, the value of i is incrementing, so the first one will be called dragon0, the second dragon1 and because we set dragons number as 3, the last instance will be dragon2 finishing the loop.
To make our life easier, we will set a variable to store the name of each dragon, dragon = _root["dragon"+i];
To update the dragons that have been just created, we need to call the function updateDragons(dragon) explained later on.
dragon.onEnterFrame = function() on real time, each intance of the dragons will:
if (this.hitTest(arrows)) check if the arrows hit them, and if it happens,
score += 5; the score will be increased by 5
trace(score); the output window will show us the score
arrowActive = false; the arrow is not active
removeMovieClip(arrows); the arrow will be removed
updateDragons(this); we will update the dragons intance
if (this._x>0) {
this._x -= this.velo;
} else {
updateDragons(this);
}
if the dragon is on the stage, its x position is bigger than zero, it will move horizontally (x axis), if not (when reaches the end of the stage) the dragon will be updated.
initDragons(); we call the function that just declared.
We declare the function to update the dragons, function updateDragons(which)
The x position of the dragon will be randomly chosen, which._x = random(100)+530;
the same with the y position, which._y = random(80)+20;
and the speed the dragon will have, is chosen randomly aswell, which.velo = random(10)+2;
random(number) means that flash will take randomly a number between zero and the number in the brackets, if you want this number to be bigger than zero, then add another number, i.e. random(80)+20 is a number between 20 and 100.
Done! we have a Vertical Shooter game!
updating the script we have:
//---- variables ----
var steps:Number = 5;
var spriteX:Number = 265;
var spriteY:Number = 265;
var speed:Number = 25;
var arrowActive:Boolean = false;
var dragons:Number = 3;
var i:Number = 0;
var score:Number = 0;
//---- properties ----
knight.swapDepths(10);
//---- functions ----
function checkKeys() {
if (Key.isDown(Key.RIGHT) && spriteX<510) {
spriteX += steps;
knight.legs.play();
} else if (Key.isDown(Key.LEFT) && spriteX>40) {
spriteX -= steps;
knight.legs.play();
}
if (Key.isDown(Key.UP) && arrowActive == false) {
knight.arms.play();
attachMovie("arrow", "arrows", 8);
arrows._x = spriteX;
arrows._y = spriteY+50;
//arrowActive = true
}
}
function updatePawel() {
knight._x = spriteX;
knight._y = spriteY;
}
function updateArrow() {
if (arrowActive == true) {
arrows._y -= speed;
}
if (arrows._y<-10) {
arrowActive = false;
removeMovieClip(arrows);
}
}
function initDragons() {
for (i; i<dragons; i++) {
attachMovie("dragon", "dragon"+i, i);
dragon = _root["dragon"+i];
updateDragons(dragon);
dragon.onEnterFrame = function() {
if (this.hitTest(arrows)) {
score += 5;
trace(score);
arrowActive = false;
removeMovieClip(arrows);
updateDragons(this);
}
if (this._x>0) {
this._x -= this.velo;
} else {
updateDragons(this);
}
};
}
}
initDragons();
function updateDragons(which) {
which._x = random(100)+530;
which._y = random(80)+20;
which.velo = random(10)+2;
}
this.onEnterFrame = function() {
checkKeys();
updatePawel();
updateArrow();
};
Adding a couple of things, you can have something similar to this.

No .fla as is better for you to learn if you read the tutorial and practice everything yourself.
If any questions, don't hesitate to contact me.

Salut!

Saturday, January 07, 2006

Creating a Vertical Shooter (Part II)

Now we are able to move our sprite but is "in the air" so we need to add a background and as is not shooting anything yet, we will add the arrows.
To add a background is easy as you already know for sure. Just add another layer in the main timeline and draw your background (I drew mine in Freehand and pasted it into Flash); is good to name the different layers so you know where the things are.



The arrow can be drawn in Flash as well (I used Photoshop to draw mine). The arrow should be a movieclip and we should leave it in the library, not on the stage.
Open the library and right click the arrow movieclip so you can open the Linkage Properties panel, if you tick in linkage options Export for Actionscript by default the identifier will be arrow, so leave it like that.
We will add to the script a couple of variables, one to declare the speed of our arrow and another to allow us to shoot one arrow at a time and we need a function to update our arrow.
Now the script look like:
//---- variables ----
var steps:Number = 5;
var spriteX:Number = 265;
var spriteY:Number = 265;
var speed:Number = 25;
var arrowActive:Boolean = false;
//---- functions ----
function checkKeys() {
if (Key.isDown(Key.RIGHT) && spriteX<510) {
spriteX -= steps;
knight.legs.play();
}
if (Key.isDown(Key.UP) && arrowActive == false) {
knight.arms.play();
attachMovie("arrow", "arrows", 8);
arrows._x = spriteX;
arrows._y = spriteY+50;
arrowActive = true
}
}
function updatePawel() {
knight._x = spriteX;
knight._y = spriteY;
}
function updateArrow() {
if (arrowActive == true) {
arrows._y -= speed;
}
if (arrows._y<-10) { arrowActive = false; removeMovieClip(arrows); } } this.onEnterFrame = function() { checkKeys(); updatePawel(); updateArrow(); };
If we test our movie, there are a couple of weird things going on.
The first thing is, the arrows are coming from the back of Pawel, so there is a problem with the "depths". And the second problem is that the arrow is active and moving before the animation of the arms is running!
Let's see first the new things in our script and then let's fix the problems.
var speed:Number = 25; var arrowActive:Boolean = false;
As said before, speed is the number of pixels our arrow will move and in arrowActive we are declaring the boolean value of this variable, as is false means that the arrow has not been shot.
if (Key.isDown(Key.UP) && arrowActive == false) { knight.arms.play(); attachMovie("arrow", "arrows", 8); arrows._x = spriteX; arrows._y = spriteY+50; arrowActive = true }
We have added another conditional, arrowActive. If it is false, the knight will move the arms, an instance of the movieclip arrow will be attached, the name of this new instance is arrows and the depth (how close to you is this object related to the other objects on the stage) is 8, so is on top of every object with a lower depth.
That's why our hero seems to be behind the arrow!
By default, the depth is 0 (zero).
function updateArrow() { if (arrowActive == true) { arrows._y -= speed; } if (arrows._y<-10) { arrowActive = false; removeMovieClip(arrows); } }
This function is telling flash that if the arrow is active, the arrow will have the speed before declared (25) and if the arrow's Y position is lower than -10 (outside of the stage), the arrow will not be active and the instance of the movieclip arrow will be removed.
this.onEnterFrame = function() { checkKeys(); updatePawel(); updateArrow(); };
In real time, flash will be checking the situation of the arrows.
Now let's fix the bugs.
We need to change the depth of our hero adding this line to our script:
knight.swapDepths(10);
And to activate the arrow in the right time, we will edit our arms movieclip.



When the hero is about to shoot the arrow (in the animation) we added the following script:
_root.arrowActive = true;
Where _root is the main timeline, so this code aplies to the variable declared in the main timeline and is activating the arrow.
So far, the latest version of the script is:
//---- variables ----
var steps:Number = 5;
var spriteX:Number = 265;
var spriteY:Number = 265;
var speed:Number = 25;
var arrowActive:Boolean = false;
//---- properties ----
knight.swapDepths(10);
//---- functions ----
function checkKeys() {
if (Key.isDown(Key.RIGHT) && spriteX<510)>40) {
spriteX -= steps;
knight.legs.play();
}
if (Key.isDown(Key.UP)&& arrowActive == false) {
knight.arms.play();
attachMovie("arrow", "arrows", 8);
arrows._x = spriteX;
arrows._y = spriteY+50;
//arrowActive = true
}
}
function updatePawel() {
knight._x = spriteX;
knight._y = spriteY;
}
function updateArrow() {
if (arrowActive == true) {
arrows._y -= speed;
}
if (arrows._y<-10) { arrowActive = false; removeMovieClip(arrows); } } this.onEnterFrame = function() { checkKeys(); updatePawel(); updateArrow(); };
As we are activating the arrows in the arms animation, we are leaving //arrowActive = true as a comment only (everything written after "//" in the same line is a comment).
Watch the sample here.

Next part of this tutorial, coming soon.