Wednesday, December 26, 2007

Substrings

This gets the fifth character out of myName. The first number is the beginning, the second is the end. It is sort of like selecting text from a start point to an end point.

myName.substring(4, 5)

Thursday, December 20, 2007

Local to Global

Here's how to take nested x and y and convert them to global x and y:

//these nested coordinates...
var myPoint:Object = {x:theClip.nestedclip._x, y:theClip.nestedclip._y};
theClip.nestedclip.localToGlobal(myPoint);
//
//are now root coordinates...
trace(myPoint.x)
trace(myPoint.y)