Tuesday, 27 October 2009 15:55

I found this snippet while revisiting some old code, and thought it might help someone else. It's trim() for AS3, and it should work in Flash or Flex.

function trim( s:String ):String
  return s.replace( /^([\s|\t|\n]+)?(.*)([\s|\t|\n]+)?$/gm, "$2" );
Last Updated on Thursday, 29 October 2009 15:14
Friday, 12 June 2009 22:41

During a recent project, I had an issue with BulkLoader. I wanted to pause all of the loaders running, then resume them later. Pausing them was easy, as BulkLoader has a static method 'pauseAllLoaders'. But resuming them was another issue. I could resume individual items with resume(), or a whole instance with resumeAll(), but there was no method for resuming all instances.

Saturday, 28 March 2009 14:30

If you've ever needed to make multiline strings in AS3, you may have found yourself doing something awkward like this:

var s:String = "This is a multiline string\n";
s += "It has multiple lines.\n";
s += "Too bad the implementation is weird.";
Last Updated on Thursday, 16 July 2009 11:33

The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. Jeff Channell is not affiliated with or endorsed by Open Source Matters or the Joomla!® Project.

Joomla Extensions