CASA Lib AS3 Release 1.2.1

Written by Aaron Clinger on September 6th, 2009

We’ve released a new minor version of CASA Lib for ActionScript 3. This release addresses bugs and documentation errors present in the 1.2.0 release.

Change Log

  • SwfLoad now correctly uses supplied LoaderContext.
  • Fixed error in ArrayUtil’s removeItem documentation.
  • Fixed misspellings in Distribution’s documentation.
  • Updated TextFieldUtil’s hasOverFlow to check for horizontal overflow as well as vertical overflow. This was causing improper detection of overflow when using removeOverFlow.
  • Fix a bug in StringUtil’s replace method; in rare cases the regular expression would not replace correctly.
  • Made a public internal function protected in StringUtil.
  • Tween will now transition correctly with a duration of 0.
  • Fixed an issue in VideoLoad class which, in rare cases, dispatched a RetryEvent/IOErrorEvent after a video had successfully loaded.
  • Load classes now throw an Error if you try to load an empty string.

1.2.1 Downloads & Documentation

ZIP: http://as3.casalib.org/releases/1.2.1/1.2.1.zip
SVN: http://svn.as3.casalib.org/releases/1.2.1/
Documentation: http://as3.casalib.org/releases/1.2.1/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.

Comments

Written by Unreality on September 7th, 2009

I <3 casalib

Written by Jean Prince on September 9th, 2009

Thank you so much for all the work on casalib, It has become a indispensable tool for creating awesome (or heavy lifting) websites.

I <3 Casalib

Written by Marcel on September 28th, 2009

Thank you!

Written by po on September 30th, 2009

thanks !

Written by kszyniu on October 20th, 2009

You could speed up the library graphics classes by replacing lineTo, curveTo to drawPath()!

Written by Aaron on October 26th, 2009

Hi Kszyniu,

There are a lot of FP10 speed improvements we could add to CASA Lib, but (for now) we want to make sure the AS3 library has full support for Flash Player 9 and 10.

Written by patrick halferty on November 4th, 2009

It would be nice to have a POST option on the dataload. Sorry to be picky. :)

Written by Aaron on November 6th, 2009

Patrick,

DataLoad does allow for posting data. Instead of passing the constructor a string you can pass it a URLRequest with method and URLVariables defined.

Written by Ilya on November 7th, 2009

Hi! CASA is the best framework, that i have founded. Thank you for it!

Can you add class XMLUtil?

Which will contains some functions like xmlAttributesToObject or xmlToObject -> that is very useful functions (i can give a source, but i think you can write it by yourself :)

And i’ll glad to see class for object pooling.

Written by JNT on November 20th, 2009

Hi there! Thanks for sharing this great toolset!

I have a question regarding the SwfLoad class: I create (MovieClip) assets in the Flash-IDE and use CasaMovieClip as their base class since I need its ‘dispose’ method for GC.

Unfortunately, when using SwfLoad to load the library assets I can only get MovieClip or DisplayObject typed objects out of it but not a CasaMovieClip.

Thanks in advance for any hint!

Written by Andrea on November 20th, 2009

Hi there. This blog is very interesting and the code I’ve downloaded is very very very awesome. Congratulations, I love your work.

Written by adrien on November 24th, 2009

I found a little misspellings in LocationUtil’s documentation.
All “root” words have the old syntaxe -> _root

Thank’s for your casalib works Aaron.

Written by chain hoist on December 14th, 2009

The Flash-IDE and use CasaMovieClip as their base class since I need its ‘dispose’ method for GC.

Written by Aaron Clinger on December 30th, 2009

JNT:
When you are using SwfLoad’s contentAsMovieClip you are getting the entire SWF movie. If you want to extract a specific class from the loaded SWF you can use SwfLoad’s getClassByName or createClassByName. After the SWF has loaded you can do something like this (assuming the class which is extending CasaMovieClip is named MyMovieClip and is exported in the library)

protected function _onComplete(e:LoadEvent):void {
  var externalAsset:CasaMovieClip = this._swfLoad.createClassByName(“MyMovieClip”);
 
  this.addChild(externalAsset);
}


Adrien:
Thanks for calling that out. I’ve updated the documentation for the next release.

Written by awariat on January 6th, 2010

groupLoad?
sorry i m not so goot in as3 but if there is no source in group load - how to go to next step and get error.

Written by Aaron Clinger on January 6th, 2010

Hi Awariat,

I am sorry, I do not understand what you are asking, but you can find the GroupLoad documentation here: http://as3.casalib.org/docs/org_casalib_load_GroupLoad.html

Written by awariat on January 6th, 2010

sorry for my english
In your example there are 4 images but if someone delete for exemple third image - loading stop instead of avoid this load. how to go to the next step (loading) without stopping in this case and how to prepare function with error

Written by Aaron Clinger on January 7th, 2010

Awariat the best way to do this is to listen to an IOErrorEvent.IO_ERROR event on each load you add to GroupLoad. If one of the files has an error you can act on it, or remove it from the GroupLoad and continue like so:

private function _onLoadError(e:IOErrorEvent):void {
  const erroredLoad:LoadItem = e.target as LoadItem;
 
  this._groupLoad.removeLoad(erroredLoad);
  this._groupLoad.start();
}

If you have more general CASA questions, not related to the blog posts, I’d suggest asking them to the email list. You can sign up for the list on the home page of the CASA site.

Written by Mycho James on February 12th, 2010

Great library, über useful, thanks again!!
I used the as2 version when you 1st released it and now the as3 quite alot.
Cheers!!

Comments are no longer accepted for this blog post.