AS3 : Using FlashVars functions in a neat class – JadBox

I’m sure some of you might be looking for a class that can allow you to do reading in flashvars. You can still do it using the my previous way but, is much neater using classes. Well fortunately, there is such thing. It’s called JadBox Flashvar class. You can get the util class here. Here an example how this class is used (remember to import the jadbox class into your main first before using it)

var myFlashvar:String = FlashVars.parameters["myFlashvar"];

or you can access the flashvar values this way.

var myFlashvar:String = FlashVars.parameters.myFlashvar;

AS3 : Using Flash Console Commandline

This post is short tutorial about using the command line feature in Flash Console Class as mentioned in previous post here. Aside from cool features like mouseOver Roller, inspect utility, measurement tool; the commandLine is one of the Flash Console greatest feature.

To control an instance on Stage with the console. You must first understand what is a Scope.

A Scope is basically, what Object the console is currently point as reference at. By default the Scope is always pointing to the Stage.

Read the rest of this entry »

AS3 : Collision Detection Kit

Ever wonder, is there an easier way instead of making loops and check for every hitTest with all sorts of  shapes and sizes? Well, may I present to you – Collision Detection Kit!

The Collision Detection Kit is a package of classes created for pixel-precise, shape-based collision detection for all display objects. It is written in Actionscript 3.0 and meant for Flash Player version 9 and higher.

The Collision Detection Kit comes with several features to control how collisions are detected, and provides data for the user of the class so they can do something about the collision:

  • Set an alpha threshold to ignore colors below the threshold.
  • Specify colors and color ranges to exclude from collision detection.
  • Receive an angle of collision for each collision. We’re not talking about bounding boxes here – the angle is calculated based on the shapes of the display objects at the site of the collision. Great for when you’re working with physics!
  • Receive the pixels that overlapped in a collision in stage coordinates. Combined with the returned angle, and your physics engine will have no problems traversing complicated shapes or performing off-axis rotation.
  • Takes transformations (scale, rotation, color transforms, etc.) of individual instances of your display objects into account.
  • Add items for collision detection regardless of their nesting.
  • You can have as many CollisionGroup and CollisionList instances as you want, allowing you to easily manage different interactions and behaviors.
  • Works with all display objects – MovieClips, Sprites, Bitmaps, TextFields, FLVs, and on and on!

Read the rest of this entry »

Mobile CSS : Universal iPhone UI Kit

I’m sure right now, some of the adventurous developer will be rushing in to develop their own Iphone apps whether it’s pure apps , web-app or web-app compiled into native app.

Well for those developing web-app and native compiled web-app, you might wanna skip the phase of designing UI themes and just settled with one standard ones but, the problem is, unlike native apps – web apps doesn’t have that kind of build in graphics and text to use as it uses the web technologies like CSS and image files. Fortunely, good news for all developers out there. Check out Universal iPhone UI Kit project. A mini prebuild CSS suitable for all Iphone and Iphone touch platform and also, it comes with all the standard cocoa looking images. Sweet!

Just download it and make reference to the css and image folder. You can start editing index.html and start  your quest in app development. :)

AS3 : Explosion Burst Class

Developing games like Shooter in As3 can be boring without good explosion effects. Over the weekends, I ported a simple class ( from As2 )which does some randomized explosion movie-clips.

This is to be used when there’s an explosion in the game. The class allows you to create explosion effect based on number of particles, size of distance and alpha. All you need is to instantiate it and pass in the variables needed. See sample below.

Read the rest of this entry »

Page 2 of 1812345...Last »