Tutorial: Create a Tower Defense Game in AS2 – Part 7

Written By MrSun at 8:07 am - Saturday, April 25th, 2009
Categories: Flash

Step 7: Finishing Touches

Welcome back! This part of the tutorial is where we just add all of the finishing touches to the game! Unlike the other parts of the tutorial, I won’t comment any of the code I give you, as the knowledge you have learned from this tutorial should tell you what’s going on. Luckily for you, there aren’t too many finishing touches for us to make, so your brain won’t hurt too much.

Now, what can we add to our little game? The answer is: it’s up to you to decide what to add. It’s also up to you to use what you’ve learned to do it right. Thank you and good night.

Final Product

Source Files (Zipped)



Glad your back Mr.Sun I thought you were gone, but I’m glad that your back. I hope you make some of your own actual games or flash movies in the future.

Michael J Williams:

Hooray, you’re back 🙂


This is pretty good!How would you go about the upgrade and menu system?


How would one go about changing this to be a tower defense game where there is no set path? So that the stage starts empty and the path is determined by the towers built by the player?


how to add multiple turrents like u pick the turrent from the menu
and how to upgrade?

plz help


how can we play the game


Nice tut…

I’m pretty new to programming and actionscript so making a game like this is probably a bit much for me, but it’s still cool to try.

Ken: I’d imagine you’d want to use a similar method that the turrents use to work out when an enemy is close enough to a turrent and then make the enemy move out of the way… you’d need some places where you can’t build though.

Martenp: You could construct a menu when the user clicks on a black spot which then lets you chose which type of turrent you build or have a menu at the bottom which changes a variable to what turrent you want and then add some if and else if statements to decide which turrent is created. If you understood all the code in this tutorial it shouldn’t be too hard. To upgrade make an onRelease function for existing turrents which could add to the variable controlling the damage the turrent gives, or you could construct a new turrent over the old one.

20 Best Flash Game Tutorials to Create Your Own Flash Game | Dzine Blog:

[…] 16. )Tower Defense Game […]


it goes too slow if you try to ad too much turrets or what ever you call it!

一步步教你20个最佳Flash游戏 | 非凡体验设计:

[…] 16. )Tower Defense Game […]


Plase make a tutorial on selling towers

公认的20个最佳小游戏教程 | 8only.cn-创见未来:

[…] 10. 猜猜下一个 11. 滚球 12. 鸡和蛋 13. 扫雷 14. 节点 15. 诡异路线 16. 塔防 17. 投石机 18. 直升机 19. 基础防御 20. 打砖块 […]

20 Best Flash Game Tutorials to Create Your Own Flash Game | dzinebook.com | DzineBook:

[…] 16.) Tower Defense Game […]