When coming from JavaScript a common mistake when drilling down through objects is that chaining doesn’t work like you would think in AS3. Yes the languages are similar but here’s a difference.
DOM
In JavaScript you would transverse the DOM using a method called “getElementsByTagName().” You can chain these to dig into the objects.
//This grabs the first input field inside the first div on the page
var textField = document.getElementsByTagName("div")[0].getElementsByTagName("input")[0];
Now in ActionScript you can’t double up on the “getChildAt()” method, because that method doesn’t have a method of “getChildAt().” Confused yet?
In ActionScript 3 you have to cast the method into an object so you can use the method again to drill down.
ActionScript 3
var sprite:Sprite = new Sprite();
var txtField:TextField = new TextField();
txtField.text = "something";
sprite.addChild(txtField);
stage.addChild(sprite);
//Cast the object returned to a DisplayObjectContainer
var path:Sprite = Sprite(stage.getChildAt(1));
trace(path.getChildAt(0));//[object TextField]
//trace(stage.getChildAt(1).getChildAt(0));//Error - 1061: Call to possibly undefined method getChildAt through reference with static type flash.displa:DisplayObject.
“It’s an all-out typeface-off in our sequel to Font Conference.” -College Humor

The other day I dusted off my old Fujitsu tablet and powered up Windows XP with an IE6 browser. (Flash back!) After tinkering for a while I bought a beautiful photo by Alexander Yakovlev to see what effects I could achieve with Sketchbook Pro and Photoshop.

After Creating a Path…
- Select the path with the Direct Selection Tool.
- Translation: Take the white arrow in your toolbar and click on the path. The anchor points will appear letting you know it’s selected.
- Create new fill or adjustment layer.
- Translation: Click on the half white/half black circular icon at the bottom of the layers panel. From the pop up select the type of layer you wish to create. (Solid, Gradient, Pattern, etc.)
A Vector Mask generated from your Path will now be included in the layer you just created.
It’s pretty safe to say Adobe has cornered the market on software used for media. Check out some alternatives to the Adobe Empire and feel free to add your own. Remember when Macromedia was the under dog?
Continue Reading…
Yesterday I experienced an unusual rendering issue in Internet Explorer. The entire layout was aligning left and a couple z-index declarations were being ignored. Usually you can fix the minor issues with some Conditional Comments but these inconsistencies were too great to blame on the Trident Layout Engine(MSHTML). Besides, before I added Coldfusion to the mix it rendered properly in every browser.
Continue Reading…
Type Doc has been rewritten and released for a second round! Typedoc is simply a CSS and XHTML editor that runs in your browser with the help of jQuery. You can save the document locally or use the provided link for any purpose you have.
Continue Reading…