Fleb Framework version 1.1: Improved Express Install Procedure and more
August 12, 2009 by: ChristianA special thank to Niklas Hallgren who brought this issue up. I must admit I have not covered the case when a user actually has the flash plugin installed, but it is outdated and the express install is started. If he clicks “Yes”, the flash plugin will be installed and everything is fine: the user will see the flash version of the website after installation is complete. This is where I stopped thinking about it any further. But what if the user aborts the express install by clicking “No”? For example, if the user is not allowed to upgrade and has to stick to the installed flash player version on his computer.
Unfortunatly when the users aborts the express install he will end up with a blank screen. Even if the user was shown the no javascript alternative content we would run into problems because of SWFAddress, which would again start the express install at the time of the next click in the navigation menu. For Fleb, this needed some rethinking.
SWFObject 2.1 together with SWFAddress 2.3
At first I wanted to upgrade to the newest SWFObject 2.2, but I ran into 2 problems. First, when I have SWFObject 2.2 installed, when I test in Firefox (3.0.13 and 3.5.2) on the PC I get a blank screen and an error in firebug: “Error calling method on NPObject“. So I switched back to SWFObject 2.1, which I have not encountered any problems on the tested browsers. And there is even another issue: The combination of SFWObject 2.2 and SWFAddress 2.3 causes FlashVars to be NULL. Read this for more info about this issue. Conclusion for the time being: I will stick to SWFObject 2.1 and SWFAddress 2.3.
expressInstall.swf changed to flebExpressInstall.swf
Here is what I did: In expressInstall.as I changed the function installStatus like this:
function installStatus(statusValue) {
switch (statusValue) {
case "Download.Complete":
// Installation is complete.
break;
case "Download.Cancelled":
getURL(baseURL+"/noflash.php");
break;
case "Download.Failed":
getURL(baseURL+"/noflash.php");
break;
}
}
If the user hits “No”, he will be rerouted to “noflash.php”, which is in fact the same page as index.php, but without SWFAddress. See the graphic below.

This page is not linked to from anywhere and has the metatags “noindex, nofollow”, so the search engines should not index it. This page is only for the user to have at least something if he cannot upgrade to the needed flash player. At the same time this is a great way to show your clients the NO FLASH version of their new flash website, without having them deactivate javascript (which they normally don’t have a clue how to do it…
)
robots.txt
In this release version 1.1 of Fleb I also have added a robots.txt file, to prevent the search engines from indexing certain files. For example SWFs. Read this post for more info about SWFAddress and robots.txt.
Here is what it looks like:
User-agent: * Disallow: /base.swf Disallow: /main.swf Disallow: /noflash.php Disallow: /structure.xml Disallow: /structure.php Disallow: /content_source/ Disallow: /content_swf/
More improvements
Because there are now two php files that use the same info texts (index.php and noflash.php) I didn’t want to have redundant data, so I have created a new file named “noflash_text.php” with those pieces of text. Just have a look at it to see what I mean.
Making things variable
I took everything out of index.php that you had to set (e.g. flash version, background color) and placed it in structure.xml. Now you don’t have to touch the index.php file anymore, it’s all variable and defined in structure.xml. In the download files I have also added a structure.xml file that contains only one language, for you to compare.
Removed code from Main.as
I have placed all code for language handling in the navigationManager2 class, now Main.as is much clearer. The code that is left there has to be there. I mean, I could take even more code out and place it in seperate classes, but that would probably get in the way of your coding style. I want the Fleb Framework to remain as clear as possible. I have put a lot of comments in Main.as to explain every step. Please let me know if you have problems or suggestions.
You can download the Fleb Framework here.
Cheers,
Christian





Thanks!
Regarding “SWFObject 2.1 together with SWFAddress 2.3″
I use SWFObject 2.2 together with SWFAddress 2.4 & I haven’t encountered any problems.
There is a SWFAdress 2.4 in the SVN of SWFAddress. You might want to check that out…
Niklas
Hi Niklas
When I use SWFObject 2.2, I get an error in Firefox Error calling method on NPObject, even when I use the original test files of SWFObject 2.2 without SWFAddress. So I think I will stick to the combination described above for the moment…
Hmmm – that’s strange.
I haven’t encountered that – I’m using FF 3.0.13
I guess it’s time to install FF 3.5
Unfortunatly the error still occurs in FF 3.5.2…
Hi Christian!
That error might be a crossdomain security problem.
Check the link below:
http://www.wrichards.com/blog/2009/02/error-calling-method-on-npobject/
Niklas
Thanks Niklas! Looks like the solution, I have not tested it, but I will try if time comes. For the moment I will use the combination described above until there are new problems arising…
Cheers,
Christian
hi Christian! I like very much what you did with this framework. I’m studying your code and I accidentely appended something to the URL in the address bar and I got the appended string printed on screen. It seems that index.php doesn’t treat this exception.
cheers.
Hi kope
Thanks for your feedback. What exactly do you mean by “appending something…”? Can you give me an example?
Hi Christian.
For instance, in the browser address bar add “something” to the folowing URL
http://www.flashcmsframework.com/flebsitedemo/#/en/about-us/
which now look like this:
http://www.flashcmsframework.com/flebsitedemo/#/en/about-us/something
then “something” is printed on screen, instead of returning “The page you’re trying to reach does not exist on this server” or something similar.
Hi Kope
This is absolutly correct, it’s up to you what you do with the deeplink. Try this: http://www.flashcmsframework.com/flebsitedemo/#/en/about-us/something/one-more/and-another-one
Now I see!
The deeplink is split in an array, I’m just displaying the array in the demo site to show how it is handled. You can grab it in your code and do whatever you like with this deeplink, for example showing a site “The page you are trying to reach does not exist…”.
Thanks for your answer. I see what you mean. I’ll have to figure out many other things (but this is entirely due to my limited knowledge), but anyway thanks for sharing this code it seems so coherent and flexible.
Interesting framework! One thing I’m not to clear about… Is your SEO/SWFAddress solution really acceptable to google? It looks like it might be considered cloaking, as it gives two different renderings of the data based on the user agent. Have you verified it’s success with any PageRank numbers or anything?
Thanks for the info!
I don’t see any problem at all. The solution used is exactly the same as here: http://www.asual.com/swfaddress/samples/seo/ which has been around for years and is used all over the world. Of course you CAN provide different content in your source files and in your SWF files, but if you are honest and just don’t, than you don’t have to be afraid of Google etc. And which alternative do you have when building pure flash websites? You can have text in your SWF files and hope they will be indexed correctly, but even there you have lots of opportunities to do some “evil” stuff if you like… I have built many websites based on the SWFAddress/SEO solution and none of them had any problem with search engines.
Hey, love your framework, especially the language part, been playing around with it a bit the last few days. I’m kind of a beginner and I’m probably making a thinking error expecting this to work, but http://www.flashcmsframework.com/flebsitedemo/#/en/products/turbo-series/3/ gives you a deeplink on screen (which is good, like that I can react on it), but http://www.flashcmsframework.com/flebsitedemo/en/products/turbo-series/3/ gives you a php error (which is less good). Any advice on implementing seo deeplinking support in structure.php? I’m not too much of a php genius.
Hi Randy
Open “structure.php” and add a “@” infront of “include…” (line 254). It should look like this: @include $content_source_folder.”/”.$node["seosource"];
I’ve already fixed this issue in the upcoming release.
Nice… that just solved my problem like it never existed… Thank you! I would like your opinion on something as well. I read it’s possible to rewrite the anchor #/ with a CGI / PERL script solution (you apparently can’t rewrite a # in htaccess, because it never makes it to that point). Do you think that’s a good idea? Do you have any experience with it? Would it work well in combination with your framework?
I’ve never heard of the possibility to rewrite the anchor tag. I would not recommend it. I try to stick to the official swfaddress seo solution. Maybe you should leave a comment on their site (www.asual.com) to ask if this is possible.