Game Examples AS2

Endless Parallax Scrolling

This is a parallax star field scrolling effect. It gives the illusion of moving through 3d space. This effect endless and will continue scrolling forever.

Download Fla Sample

Download Fla Sample

Tags: , , , , , , , , , ,

Dynamic Tooltip

Tuesday, July 14th, 2009 | Game Examples AS2, Interface | 10 Comments

This is a dynamic tooltip window script that sizes and positions itself based on tooltip content size and location on the screen. It calculates it’s own size and current location, and if outside of the stage, reposition itself to remain always visible.

Download Fla Sample

Download Fla Sample

Tags: , , , , ,

Flash Game Projectile Weapons

Tuesday, June 16th, 2009 | Game Engine, Game Examples AS2, Game Weapons | 5 Comments

This is version 3 of my Flash game projectile weapons script. It is totally rewritten & optimized to support multiple weapons, multiple enemies & collision detection. All the functions are encapsulated for easy re-use.

Features:

Weapon

  • Number of bullets
  • Bullet speed
  • Bullet age
  • Reload speed

Weapon Management

  • Weapon Database
  • Weapon Database Search
  • Equip Weapon Function
  • Reload Weapon
  • Create Bullet
  • Update Bullet
  • Destroy Bullet

Enemy Management

  • Create enemy
  • Enemy Collision Detection with Bullets
  • Destroy Enemy
Download Fla Sample

Download Fla Sample

Tags: , , , , , , , , , , , , , , , ,

Pixel Perfect Collision Detection

Wednesday, May 27th, 2009 | Game Examples AS2, Images | 6 Comments

This is a great “pixel perfect bitmap collision detection with rotation” script by Grant Skinner. This is definitely better than hitTest for rotated irregularly shaped objects and bitmap images. Works great with transparent pngs as well.

Preview

Download Fla Sample

Download Fla Sample

Original Bitmap Collision detection class by Grant Skinner
http://www.gskinner.com/blog/archives/2005/10/source_code_sha.html

Tags: , , , , , , , ,

Laser Hitting Solid Objects & Walls

Wednesday, April 29th, 2009 | Game Examples AS2, Game Weapons | 8 Comments

As the title suggests, this is a laser weapon script that shoots a laser beam. The beam stops when it hits solid objects. Written in AS2 to be used in Flash shooter games.

This script was written in collaboration with InvisGhost. Check out his site at http://invisghost.com/.

Download Fla Sample

Download Fla Sample

If you’re having trouble understanding how this script works, please review previously posted examples that were incorporated in to this script: Shooting Laser Weapon & Apply Filters Dynamically.

Tags: , , , , , , ,

Bubbles Effect - Water, Beer, Liquid

Monday, April 13th, 2009 | Effects Dynamic, Game Examples AS2 | 1 Comment

Simple actionscript bubbles effect. Can be used in flash water games, beer banner ads, etc.

Download Fla Sample

Download Fla Sample

Bug Fix - 6.18.2009
Fixed an issue with the container size. Bubbles are now created based on container width/height.

Tags: , , , , , , , , , , ,