Home > Dev > FDT Template: Quick-create Child DisplayObject

FDT Template: Quick-create Child DisplayObject

Let’s burrow some in my FDT templates crate … how often do you have to add a child display object to another display object? If the answer is ‘very often’ then this small FDT template might save you some time.

${property} = new ${cursor};
addChild(${property});

It’s very simple but effective. Usage: Let’s for example name this template “newDisplayObject” and after invoking it with CTRL+SPACE you start typing the name of the display object property that you defined as a class property before which then should be auto-completed, then you hit TAB and then CTRL+SPACE to quick-insert the type after the ‘new’ operator (FDT is finding the correct type for you) and Voila, you’re finished, no need to add that extra ‘addChild’ manually.

Categories: Dev Tags: , , ,
  1. July 19th, 2009 at 05:58 | #1

    hi. this is really useful, thanks!

  1. No trackbacks yet.
You must be logged in to post a comment.