Archive for the ‘AS3’ Category

Alternate “Trace” Command in AS2 & AS3

AS2, AS3 | Posted by David Jumeau
Jul 21 2009

I had taken some video tutorials at Flash Extensions.com way back, and I always liked Robert Taylor’s appoach in using the trace command in Actionscript. I would represent this via the “tr” method in each of my classes so that when I am previewing the program, I can know in which class I can find the origin of my trace statements. AS3 is not much different since you can use multiple arguments in your function parameters.

The AS2 version used an undocumented arguments array in the parameters of a function like this:

// This method in a class called MyClass

private function tr(arguments):Void {

  if (arguments.length == 0) {
    trace("");
  } else {
    trace("[MyClass] ... " + arguments.join(" : "));
  }

}

In AS3,

// This method in a class called MyClass

private function tr(... args:Array):void {

  if (args.length == 0) {
    trace("");
  } else {
    trace("[MyClass] ... " + args.join(" : "));
  }

}

Holy Collision Detection Batman!

AS3 | Posted by David Jumeau
Jun 18 2009

colbert_collision_detectionCasually checking out my Tweets and Peter Elst put this link up: http://www.coreyoneil.com/portfolio/index.php?project=5

It is very difficult to perform collision detection. Usually, sometimes you need some kind of mathematical algorithm to carry it out. But Corey managed to do it at a pixel level and even at on gradient / alpha thresholds. Very impressive indeed! It’s funny to see the Stephen Colbert video. Highly recommended blog reading!

PureMVC notes from Tim Willison at FITC

AS3 | Posted by David Jumeau
May 05 2009

As FITC came and went at the end of April, the original developer for PureMVC Cliff Hall could not make it (sprained ankle), but Tim Willison covered for him. He posted some slides at his blog in regards to PureMVC development. He provides an example done in Flash. (I assume it to be in Flash CS4. Most examples are done in Flex. So this is a treat!)

Here are the links:

FITC: http://www.oddlystudios.com/?page_id=192&paged=3

Example, Part 1, 2, 3: http://www.oddlystudios.com/?page_id=192&paged=2

Part 4, 5, 6: http://www.oddlystudios.com/?page_id=192

DJ

Tween Engines

AS3 | Posted by David Jumeau
Mar 25 2009

Update (March 25th, 2009) : Grant Skinner’s gTween and Tweenlite are being merged.

There are a lot Tween engines out there. Here are a couple available for Actionscript development.

  • The FuseKit. (AS2-based tween engine. Moses Gunesch manages this site. I discovered this tween library at Lee Brimelow‘s Flash tutorial site at gotoandlearn.)
  • The GOASAP site is Moses Gunesch’s AS3 Tween engine library
  • Grant Skinner did a major rewrite of his gTween engine recently (Feb 2nd, 2009).
  • KitchenSync (I first came across this at the Head conference online conference.)
  • Tweener (Available for AS2 and AS3. The documentation is very helpful. I use this library for my AS2 development.)
  • Tweenlite (Recommended by Papervision2D’s blog.)

When I had scoured sites over the internet, I could not really find any preference over the other. With exception to Papervision 3D Tutorial site, a blogger named Charlie [If somebody can tell me his name, I would like to know] recommened Tweenlite over Tweener for its superior speed rendering. Anyway, I am sure that someone will have some kind of speed comparison tests.

Flash Camp 2009 Montreal

AIR (Formerly Apollo), AS3, Flash Builder (formerly Flex Builder) | Posted by David Jumeau
Feb 06 2009
Flash Camp logo

Flash Camp is coming...

Flash Camp is coming to Montreal. Mike Potter is coming to Montreal to give us a pep talk about Flex Builder, Flash Catalyst and etc. Free food, Free t-shirts, and more…

Find out at the swfmontreal site.

DJ