Fleb Framework v1.2: Dinner is served!

January 4, 2010 by: Christian

fleb-flash-website-opensource-frameworkIt’s been a while since the release of Fleb v1.1. I’ve been using it ever since to build websites (here you can find some examples) and at the same time have improved it a lot. It is still the same, the PHP/CSS/HTML section has not changed a lot despite a few small improvements. What did change are the classes: I have removed every line of code I could out of Main.as and Base.as which were disturbing the creative work, for example setting up SWFAddress, waiting for the global navigation to finish initialisation, handling the loading/unloading of content pages etc. This code is now placed in separate classes like Startup.as, Core.as, PageLoader.as in a package “net.kaegi.fleb”. You don’t have to think about these classes and can concentrate on the cool design of your flebsite! What else? Oh, and I have created a logo for the Fleb Framework. :-)

But what the heck has “Dinner is served” to do with the Fleb Framework?
When I build a flebsite, I like to think of it as a table ready laid. If I want to have dinner, I will always find 3 things for sure: the table itself, a plate and some food on the plate. (Some of you might argue now that you can also eat on the floor without a plate, holding the food in your hands… Right. And you can also build websites by using SimpleText or Word… ;-) ) Okay, back to the point. Oh, I forgot two more things: the tablecloth or placemat and the menu card. But lets start with the table.
fleb-flash-website-opensource-framework-v1.2-dinner-is-served

The table
Normally, you do not spend a thought about the table itself, but it is really important. If you remove it,  you will end up in a mess. It always has to be there, but once you have placed it somewhere in your house or flat, you probably will spend more time on the things you put on that table than the table itself. So to me as a flash website designer, I like to see the table as the necessary PHP/CSS/HTML/SEO construct I don’t want to care about every time I build a new flebsite.

The tablecloth or placemat
For a decent dinner, before I put a plate on the table, I want to have a tablecloth or at least a placemat. To me, the tablecloth/placemat represents the basic settings of a flebsite: all the things that are most likely not going to change during a session, like the background image or color, a footer, a logo, a sound on/off switch etc. The tablecloth stands for a fullscreen flebsite, whereas the placemat represents a fixed size flebsite. The placemat, for example, may or may not be moved around with the plate, whereas the tablecloth will certainly stay in place when I scale the table (ups, sorry, I mean the browser window…)

The plate and the food on it
The plate is the place where the action is happening: During a dinner, you may have a drink, followed by a salad or soup, then the main dishes and finally a dessert. The plate may or may not change for every course, but the food certainly does. You can share one plate for salad and soup (maybe you are having dinner at home and just don’t have more plates… ;-) ), while the main dishes are being served on different plates (even the shape and colors of the plates may change). The dessert will be served on a nice transparent glass plate.
Think of the plate as your content page. The SWF displaying your data. The food is the actual data source. So you can have one plate that holds different food (the dynamically loaded content). If the food (the content) will be completely different (e.g. a change from a contact form to a gallery), than you might want to change the plate as well (the SWF). Than you have the cutlery that may or may not change with the plate: You can use the same fork for the salad and for the main dish. But you surely prefer a smaller spoon for the dessert than for the soup.

Got the point?
While the table will not change at all and the tablecloth and placemat will remain the same during a “dinner session”, the plates, cutlery, glasses etc. will change, being moved around and emptied/filled up a lot.

One more: the menu card
To make this metaphor complete I like to think of the global navigation as the menu card. When you hold it in your hands, it is floating above the table. In your mind you “navigate” through the dinner by selecting your food just like clicking on the buttons of a website.

…and the last one: the waiter or “the brain”
Because I later refer to “the brain” when talking about “main.swf”, think of it as the person who knows everything about your dinner: the waiter. While your guests are the visitors of your flebsite, the waiter knows what to put on which plate, where to place it on the table, in which order the dishes have to be served, who has salad and who has the soup, who is vegetarian and has the risotto, when it is time to light the candles, clean up breadcrumbs, dim the lights, pump up the volume of the background music, help you with the chair if you need to go to the ladies’/men’s room, inform you about an incoming telephone call, when to ask you if the coffee may be served and so on….


Fleb Framework 1.2

fleb-flash-website-opensource-framework-overview

What’s new?
As written in the introduction, the whole framework has been cleaned up and restructured. Now there is much less code in main.as and you can concentrate on the design etc… As the Fleb Framework is based on the Global Navigation, I have moved the navigation settings into structure.xml. So now the whole website structure is defined in a central place.

Flow
When base.swf (the “tablecloth/placemat”) is loaded, it starts loading main.swf (the “waiter” or “brain”). A preloader in base.swf shows the loading progress, main.swf will use 50% of the preloader bar. When main.swf is loaded, the navigation is initialised, which will use the other 50% of the preloader bar so it will reach 100% when main.swf and the navigation are completely initialised. Main.as will also create the pageHolder movieclip (the “plate”) and the navigationHolder movieclip (the “menu card”)


Examine the demosite

Example 1: Landing on the homepage of the site
Launch the demosite: http://www.flashcmsframework.com/flebsite_demo_v1.2
As you can see, there is kind of an intro before the navigation is animated into place. Of course it is up to you to have an intro. This is just an example.

Example 2: Deeplinking
An intro is nice if the user enters the site via the homepage. But what about a deeplink?
Try this:  http://www.flashcmsframework.com/flebsite_demo_v1.2/en/products/turbo-series
Now the user wants to get quickly to the content, so the intro is skipped.

Example 3: Deeplinking with parameters
Maybe you have an image gallery on your site. You want to be able to deeplink to a specific image, but, because the gallery gets updated often, you cannot define all links in structure.xml. They need to be dynamic.
Check this: http://www.flashcmsframework.com/flebsite_demo_v1.2/en/service/some/more/info
The address defined in structure.xml is “/en/service/”. Everything which is beyond this scope will be stored in an array called deeplink. That way you can set up an event listener in your SWF and do whatever is needed, for example loading a certain image. This even works without flash, so you can catch the deeplink in your PHP file to feed the search engines:
http://www.flashcmsframework.com/flebsite_demo_v1.2/noflash.php?swfaddress=/en/service/some/more/info

Show your clients the “no flash” version
Maybe you’ve noticed the noflash.php part in the previous sample link above.
Try this: http://www.flashcmsframework.com/flebsite_demo_v1.2/noflash.php
This is the site the user will see if he cancels the express install procedure. But at the same time it is really useful to easily show your clients the work “under the hood” without having them deactivate javascript.

Transitioning pages
Launch the demosite: http://www.flashcmsframework.com/flebsite_demo_v1.2. If you navigate to “About us”, then “Service”, you see that the pages are just fading in and out. Now click on “Static content”. Here the previous page will not only fade out, but also move to the right, then there is a pause, just before the “static content” page slides in from the left.In fact it is very easy to set up different transitioning modes.

SWFObject 2.2 / 2.1
While using the new SWFAddress version 2.4, there are problems with SWFObject 2.2 when you cancel ExpressInstall in Firefox on PC: you will end up with a blank screen. This issue is not occuring with SWFObject 2.1, so I will continue using this version for the time being.

How to start?
Download the Fleb Framework from the download section. It also contains the complete source of the demosite. Dive into the files and visit the documentation, I have spent some time updating it.

Happy coding!
Christian (the flebber….;-))

Comments

4 Responses to “Fleb Framework v1.2: Dinner is served!”
  1. David says:

    Man, this looks really great! Can’t wait to check it out!

  2. Melvin Brunt says:

    Like your blog :-) I’ll check your site later again.

  3. Anjum nawab says:

    Hey its cool main i have bookmarked ur site thanks for posts

  4. George says:

    Hey mate, I have to say that you did an excellent work!!!

    But you might consider in changing the swfobject, with jquery.flash!! You can find more info here http://www.stephenbelanger.com/2009/10/04/jquery-flash-who-needs-swfobject-when-you-have-this/

Trackbacks

Leave a Reply

Comment Spam Protection by WP-SpamFree