Free ActionScript

Flash AS2 & AS3 Tutorials, Game Code, Effects, Source Files & Sample Downloads

Bitmap Trailer using Blitting technique

This is an AS3 mouse trailer example using the Blitting technique.

From Wiki on Blitting: “A classic use for blitting is to render transparent sprites onto a background.”

So instead of having 100′s of movieclips on the screen at the same time, you only have 1 bitmap object. This dramatically improves performance.

This also allows you apply filters to this bitmap image to achieve all kinds of fancy effects, such as this trailer using blur and alphaMultiplier (bitmap alpha control).

Preview v1.0.0

Download Fla Sample

Download Fla Sample

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

Update:
ActionScript 3 version of this script is available here:
http://www.freeactionscript.com/2010/06/endless-starfield-parallax-scrolling/

Dynamic Tooltip

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

Flash Game Projectile Weapons

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

Update
AS3 version of this script is available here:
http://www.freeactionscript.com/2011/07/projectile-weapon/