On this page I will try to give you an overview of the philosophy of the Turtlebite Flash CMS.
Everytime you edit content in a slot, the slot position and height is saved along with the content itself (text and images). It is important for you to understand that there are 3 different ways of how the slots are loaded in your website later on:
The slots are loaded and positioned automatically. It is the most direct way to load slots and only requires a few lines of code.
Here the slots are loaded in the same way as in “Standard”, but you can “hijack” the events of a textfield or image and do further enhancements before the slots are placed on stage, for example add shadows to textfields/images, adjust the rotation of an image, “addChild” a sprite of a picture frame over an image and so on.
As the name implies, in “Free” no slots are drawn at all because you are going to control the content of the loaded slots. When all slots are loaded, an event is fired. You can then access an array that contains all your data and do what you want with it, completely detached from the static positions of the slots.
Just read on. I will refer to these 3 ways in the casy studies below.
This is the most simple case. You want to edit a single textfield, for example a headline, a single-line foot note or multi-line text somewhere on your site. No images are needed, the textfield has a certain size, nothing exciting. Only one slot is required.
Still simple: In this fixed layout two textfields (one for the title, one for the body text) and an image is needed. All three content elements have fixed positions; the image will always have the same height and width, therefor only one slot is needed.
Here, more than 1 slot is needed, because this is a variable layout: the user can add/remove slots and change layouts in each slot. The height of the whole page varies depending on how many slots are used. Still we use the “Standard” way, because there is no need to adjust the position or enhance content elements of a slot. The slot layouts are used to “mimick” a newspaper style. 5 different slot layouts are defined:
| Slot(s) | Layout |
|---|---|
| 1 + 3 | “One Textfield” |
| 2 | “Two Images” |
| 4 | “Textfield left, Image right” |
| 5 | “Two Textfields” |
| 6 | “One Image” |
You can define as many layouts as you need, they can be freely named.
This is exactly the same as in case study 3, except that now we hijacked the textfield and image events to add shadows and a picture frame before the slots were added on stage. 4 different slot layouts are defined:
| Slot(s) | Layout |
|---|---|
| 1 + 2 | “One Textfield” |
| 3 | “One Image” |
| 4 | “Textfield left, Image right” |
In this case study, there is a fixed layout. The textfields are always at the same spot, so does the picture and the size of it. Imagine a greeting card for example. Because all is fixed, there's no need to use more than one slot. The content elements are freely positioned, so we do it the “Free” way and take care of drawing the slot content on stage by ourself.
A common scenario: the picture gallery. In this scenario we need a picture (thumb and large version) and a description text. In case studies 2 to 5, no thumbnail was created when a picture was uploaded. If a thumb is needed, naturally it can be created!
You can exactly define to what size the uploaded pictures are being resized, with correct aspect ratio etc.
One slot for each image/description is needed, with only one layout (image left, text right). Again, as we are not interested in the position of the slots, we do it the “Free” way and use the provided slot content array to feed our gallery.
In fact, you can only handle textfields and images in the Turtlebite Flash CMS. There is no audio- or videoplayer. But there is no need for it
: You can upload any files you allow the user to be able to upload, for example MP3 or FLV files. Now here's the trick: just use a simple textfield for the content you need to feed your player. In the example here one slot is used, which contains one layout with 2 textfields. The first textfield contains the url to the MP3 file, the second the name of the song. Again, we are not interested in the position of the slots, so we just hijack the textfield events and use the generated slot content array to feed our player.
Of course you are not limited to one setup per page: For example, you can have an SWF containing the Flash CMS and use this SWF as an image in another page that uses the Flash CMS… I did this here: http://www.marviva.net/es/nuestros-programas/control-y-vigilancia –> “La Flota de Marviva”.