AS3

Netbeans & Silver Stripe

OK quick note, Netbeans is an awesome IDE. Love the debugging options an set to xdebug default options. So it just works when running Linux PHP Xdebug. Was a life changer when someone showed me how about six months ago.

Silver Stripe is also an awesome PHP framework/cms. But .ss files the ones used by the Silver Stripe templating system don’t get recognised by Netbeans. A quick Google resulted in a few incomplete forum results. I’m using Netbeans 7.2 and it took under a minute once I knew where to go, to enable syntax highlighting and code completion (apart for ss template tags).

Read more →

Bitmap to ByteArray

Some notes about using sprites from Flash Professional in Flash Builder.

1 When adding Sprites or Movie Clips to a Flex application add them to a UIcomponent first or use rawChildren.addChild() to avoid run time errors.

fx:Script spritecanvas.addChild(new Sprite()); // OR this.rawChildren.addChild(new Sprite(); </fx:Script> <mx:UIComponent id=“spritecanvas” width=“100%” height=“100%"> 2. The information on labeled timelines and labeled movieclip instances remains intact

fx:Script [Embed(source=”../sprites/Demo.swf", symbol=“test”)] private var TimeLineTest:Class; var TestTimeLine:MovieClip = new TimeLineTest() as MovieClip; TestTimeLine.gotoAndPlay(’timelinelabel’); // accessing sub movie clips which have been given an instance name in Flash Professional // TestTimeLine.inception == MovieClip </fx:Script> 3. AS3 code however does not remain intact but stop() commands do (I’m wondering if I’m missing a flag here when embedding) A movie clip symbol in Flash Professional which is given a base class of the following

Read more →

Flash Professional & Flash Builder Compatibility with Sprites

Some notes about using sprites from Flash Professional in Flash Builder.

When adding Sprites or Movie Clips to a Flex application add them to a UIcomponent first or use rawChildren.addChild() to avoid run time errors.

<fx:Script>
 spritecanvas.addChild(new Sprite());
 // OR
 this.rawChildren.addChild(new Sprite();
</fx:Script>
<mx:UIComponent id="spritecanvas" width="100%" height="100%">

The information on labeled timelines and labeled movieclip instances remains intact

<fx:Script>
 [Embed(source="../sprites/Demo.swf", symbol="test")]
 private var TimeLineTest:Class;
 var TestTimeLine:MovieClip = new TimeLineTest() as MovieClip;
 TestTimeLine.gotoAndPlay('timelinelabel');
 // accessing sub movie clips which have been given an instance name in Flash Professional
 // TestTimeLine.inception == MovieClip
 </fx:Script>

AS3 code however does not remain intact but stop() commands do (I’m wondering if I’m missing a flag here when embedding) A movie clip symbol in Flash Professional which is given a base class of the following

Read more →

Adobe AIR SQLite ORM

Quick update and interesting note. I’ve been blogging about AIR and SQLite databases, and recently I’ve had to put together an analytics tracking library for AIR (currently Google Analytics only supports Flex apps, it needs the DOM to function).

Wanting a better approaching to persistent data in AIR I started writing my own DataObject to handle saving and retrieving data. While writing it I thought surly someone had implemented something like this, and sure enough they have.

Read more →