It took longer than expected, but there is finally a new release of CASA Lib for AS3. This release adds stability, improvements and a lot of great new features. Some of my favorite changes are the new class LoadItemUtil which creates a CASA load item based on the file path, the additions to GroupLoad to make it more versatile and the modifications to AlignUtil and Distrubution to use DisplayObjectUtil‘s new getOffsetPosition method to be able to properly align DisplayObjects that have been scaled or whose registration point is not at 0, 0.
This release and all future releases will include a SWC archive file along with the full class source for those who prefer SWCs over class libraries.
Update: If you are compiling with MXMLC and getting an error please read about the compiler bug: 1047 Compiler Error with AS3 1.3.0.
Change Log
- Added CasaShape.
- Added LoadItemUtil with a
createLoadItemmethod. The method takes in a file path and returns the correct CASA load type. - Added UrlVariablesUtil class which contains an
alphabetizemethod for sorting URLVariables. - Added
align,alignToPixel&alignRectangleand convenience methodsalignBottomCenter,alignBottomLeft,alignBottomRight,alignMiddleLeft,alignMiddleRight,alignTopCenter,alignTopLeft&alignTopRightto AlignUtil. - Added
autoLinkto StringUtil which detects URLs in a String and wraps them in a link. - Added method
truncateto StringUtil. - Added
uuidandcreateRandomIdentifierto StringUtil. - Added
drawPathanddrawShapeto DrawUtil. - Added
erroredgetter to LoadItem which can be used to determine if the load could not complete due to an error. - Added
getOffsetPositionto DisplayObjectUtil. The offset can be used to position DisplayObjects whose registration point is not at 0, 0 and/or is scaled. - Added method
getChildrento DisplayObjectUtil. - Added
getTotalEventListenersto RemovableEventDispatcher and all event classes. - Added
getValuesByKey,getItemByKeys,getItemsByKeys,getItemByAnyKeyandgetItemsByAnyKeyto ArrayUtil. - Added
recursiveparameter todestroyProcessesin ProcessGroup anddestroyLoadsin GroupLoad. - Added a
stop()in thedestroymethod of CasaMovieClip to avoid any lingering garbage collection issues. - Added a recursive option to ProcessGroup‘s
hasProcess. - Added method
addChildWithDimensionsto Distribution. - Added
getLoad,hasAsset,erroredLoads,loadingAndCompletedLoads,erroredto GroupLoad. - Added static methods
getGroupLoadByIdandgetGroupLoadByAssetto GroupLoad. - Added the ability to add a GroupLoad into a GroupLoad.
- Added the ability to get
bytesLoadedof a GroupLoad, andbytesTotalafter the GroupLoad has complete. - Added the option to define an unique identifier to a GroupLoad.
- Fixed ProcessEvent‘s
toStringto return the correct properties. - Fixed a typo in the KeyComboEvent class.
- Fixed an issue with CasaTextField in AIR.
- Fixed an issue with AudioLoad when it attempts to retry a load. Thanks to Rob Gungor.
- Fixed an issue with Sequence when a task is removed immediately after it completes.
- Fixed bug in ProcessGroup which may case the group to run when not desired.
- Fixed issue where GroupLoad would try to temporarily reload loads destroyed with
destroyLoads. Thanks to Simon Lindsay. - Renamed AlignUtil‘s
alignCenterMiddletoalignMiddleCenterfor consistency. - Updated LoadEvent to no longer extend ProgressEvent.
- Updated GroupLoad so it reports a more accurate load percentage.
- Updated Process to only dispatches event
STOPwhen destroyed if the Process was running when destroyed. - Updated FrameDelay to extend from Process.
- Updated Interval so you cannot remove required internal event listeners.
- Updated Distribution so it positions items with DisplayObjectUtil‘s
getOffsetPositionto properly position scaled or offset DisplayObjects. - Updated AlignUtil so it positions items with DisplayObjectUtil‘s
getOffsetPositionto properly position scaled or offset DisplayObjects. - Updated NavigateUtil so it fails gracefully if script access is not allowed.
- Updated QueryStringUtil so it fails gracefully if script access is not allowed.
- Updated StringUtil‘s
getLettersFromStringandtoTitleCaseto support non-english letters. Thanks to Tomaso Neri. - Updated documentation to address typos, add more examples and document all the CASA errors thrown.
1.3.0 Downloads & Documentation
ZIP: http://as3.casalib.org/releases/1.3.0/1.3.0.zip
SVN: http://svn.as3.casalib.org/releases/1.3.0/
Documentation: http://as3.casalib.org/releases/1.3.0/docs/
Please note: We advise you to only use the latest release links. This way you can be assured that the version you are getting is the most up to date. We provide links to specific versions to be used in cases of forward compatibility issues.
Written by nadous on March 29th, 2010
Whoa! Didn’t update since 1.1 and 1.3 appears to be a hell of an update. Thx for your work!