27 December 2007
Straighten quotes in textmate
One thing I missed from BBedit was straightening quotes. Just found these great commands that do the same thing.
One thing I missed from BBedit was straightening quotes. Just found these great commands that do the same thing.
I’m pretty sure that making custom components in AS3 is worthless now. It was already kinda shaky in flash 8 and the documentation lacking. Check out this example of where I’m running up against a wall:
package {
//imports
import flash.display.*;
import flash.events.*;
//class
public class Module extends Sprite {
//component property
[Inspectable] public var label:String;
//constructor
public function Module() {
trace(label);
addEventListener(MouseEvent.ON_CLICK, clicked);
}
//click event
private function clicked(e:MouseEvent) {
trace(label);
}
}
}
In this example, you create a simple sprite (the shape of which isn’t set here) that has a label property that you should be able to edit in the authoring environment. After adding it as a component in the library and editing the “label” field in the component inspector, publish. The first trace, in the constructor, will output null. It’s not set yet. But once you click on it you see the label you’ve given it. So, it is storing the input from the component inspector. However, flash AS3 doesn’t seem to provide a “creationComplete” event like Flex does. So you can’t tell at what point your properties were set.