Temple open sourced.
‘Temple‘ is the name of our AS3 library we use at MediaMonks. Almost all of our AS3 projects are using it. The Temple is inspired on several 3rd party libraries like ASAPLibrary, AS3CoreLib and CaseLib, but adapted to fit our needs.
The Temple consists of several classes we use on a regular basis. They are designed for reusability and optimized for performance and memory usage. The Temple is specially designed to work with other frameworks like Gaia. The core of the Temple focuses on: debugging, destruction and memory management.
Debugging
Many classes are debuggable and have a ‘debug’ property. When this property is enabled, the object logs debug messages which allow you to see what the object is doing. All debuggable objects can be managed by the DebugManager. The DebugManager allows you to run all objects in debug mode.
All messages are logged through the Log class which is easily extended for usage by other logging applications, like Yalog and DeMonsterDebugger.
Destruction
All objects are destructible. By calling the destruct- method, the object will clear all of its data, removes all event listeners, removes itself from the display list (DisplayObjects only of course) and makes the object available for garbage collection. Destruction is recursive, so an object will also destruct all its children.
Memory Management
All Temple objects are tracked, via weak reference, in the Memory class. You can view all objects in the Memory class. This makes it possible to detect if an object’s destruct method is working correctly.
More
We also added many nice utility classes for the initial release of Temple, however there is a lot more to come. Since we are keen on stable, neat, and well documented code we are initially only releasing the core of the Temple library. This code has been used and tested and has proven to fit our requirements. There is a lot more we are planning to release soon, like UI components (buttons, form components, video player), loaders (CacheLoader, ImageLoader) and behaviors.
The Temple can be downloaded from Google code and the documentation can be viewed online.
For updates follow us at Twitter.
The Temple is released under the GNU General Public License which allows you to use, extend or modify the code to whatever you want.
March 23rd, 2010 at 8:57
Good job dudes!
October 27th, 2010 at 9:14
I would say great job, really! I’ ve started using your lib couple of days ago. I really like new features of 2.7 version. Is there any chance to get more examples of two particular classes usage ? I mean video player and liquid layout for now.
October 27th, 2010 at 9:46
@Hadro > Thanks! And yes, we are definitely going to add more examples to the Temple. The Temple is constantly under development so you can expect a lot more features to come in the future. We are also working on better documentation, how-to’s, etc.
Follow us on Twitter (http://twitter.com/#!/templelibrary) to get the latest updates and info.
October 29th, 2010 at 0:00
Hi Thijs! It’s me again. I wonder is it possible that you send me any example via email of how to deal with switching fullScreen/normal mode with temple VideoPlayer. I’ve been struggling with it for some time with no luck unfortunately. Any help would be appreciated
October 29th, 2010 at 12:31
@Hadro > I am currently very busy, but I’ll try to add a fullscreen video example to the Temple as soon as possible.
May 12th, 2011 at 17:14
To take advantage of the temple library- does the base class of all my movieclips need to be reassigned to CoreMovieClip?
( I don’t understand why I keep getting an error message that temple.core::CoreMovieClip can’t be found, although other classes in the .swc are found ok. - and if I assign that class to a MovieClip, Flash finds it.)
May 12th, 2011 at 19:13
I have put in temple.core.CoreMovieClip as abase class in Flash and clicked edit to view the class (inside the .swc?) and all I get is a stub:
package temple.core {
import flash.display.MovieClip;
public class CoreMovieClip extends MovieClip {
public function CoreMovieClip() {
// constructor code
}
}
}
So no wonder I am being told that the app. can’t find it - I don’t know what can have happened to strip it out, but anyway…
I downloaded the 2.8.6 swc again - put it into Gaia and same thing. Do yuo have any idea what is going wrong here? I can’t believe you didn’t put the class in the swc - surely someone else would have mentioned this by now…
May 13th, 2011 at 10:21
@Sine: I looked at the files you sent me, but you used the absolute path (’/Users/sine/Documents/afl5/Gaia/lib/Temple_2.8.6.swc’) to the SWC. Probably you moved your files to a different folder and the path was broken. You should always use a relative path (in your case ‘./Temple_2.8.6.swc’) to the SWC file, so the files won’t break if you move or copy them to an other folder.
Flash can’t view or edit classes inside SWC files. That’s why you see an empty class when you click ‘edit’.