Archive for November, 2007

Using fl.* packages in Flex and more

Slow days at work means I get to experiment and search the web for new ways to develop. I did a lot of research today on Flex until I stumbled on this presentation on the beedigital blog. It’s a very nice presentation on how to integrate Flash and Flex in your workflow. That’s exactly what I wanted. After see it I tried to do some test projects in Flex. Most of the time I do every thing in ActionScript so I thought this wouldn’t be too difficult. The trouble is that most of the time I also use the Tween and Easing classes from Flash. These classes come in the fl.* package and this package does not compile in Flex. I searched a bit how I could make these classes compile but I only found complicated methods of doing so. I tired also to use the Tween classes from Flex, but in order to use them you have also to include the Flex framework which adds 100k to your project. My simple solution to this problem; using Tweener for my tweens. Tweener only adds 10k to a swf file compared to the fuse engine (which is not in AS3 yet). It’s not so bad, it’s only a 8k difference to the Flash Tween classes (2k). Also using it a bit, I might have misjudged Tweener a bit because it works very well. I might in the future redo some example using Tweener instead of the Tween classes.

I went on the blog of Samuel Asher Rivell, the author of the presentation I spoke of earlier, and found some other interesting things. First there is the Montreal Game Summit that’s going to be held on November 27th and 28th. I live in Montreal so I’d be pretty happy to go there, at least on the first day. It has some interesting conferences about Flash that I’d like to see especially the one given by Samuel Asher Rivell on Advertgames.  The second nice thing I found on his blog is the powerpoint presentation of one of the conference he gave on blitting. I had seen the technique some time on the web but never knowing what it was or how to do it. His presentation is a good introduction to it and I’d be really interested in hearing his speech about it. There might be more on blitting on this blog since it looks really promising.

, , , , , , ,

No Comments


SEO and Flash part 2

In the previous article I said my tutorial about search engine optimization was going to be in 2 parts, well it’s going to be in 3 parts. In this part, I’ll explain the brute force way of making what we did the last time even better and I’ll explain the motivation behind it.

Remember that in part 1 I said that one of the most important factor in search engine optimization was what is inside the title tag. Well the easy way of making you flash website be present in search engines didn’t really optimize that factor; we used it a bit but not to its full potential. Also there is something else I didn’t speak about; the description meta tag. This tag is not a factor to be well ranked in search engine, but it can definitely be a reason why the user will click on your link on the Google page or any search engine’s page. The description meta tag define the paragraph of text that will be displayed below the link in the search engine search result page. Having a good and precise description can really help get users to your website. Lastly, if somebody searched for an expression that is present in your flash website but it is really far in and not that easy to find, in our previous method, the user will have to search trough your site to find it and might leave before even finding it.

Ok, so the previous method was that we dumped all the text present in the swf file in the html page embedding it. This was fine, but not really optimal as I have explained. Going from there, what the brute force is all about is dividing all the content we dumped in the first method into different html pages. For each section in the flash website, we make a page for it in Html and we embed the same swf in all pages. There are 3 particularities you have to add to make this work.

First, in the embedding method using SWFObject, you have to pass a variable the swf file telling it what page it is on. You can do it in this way:

<script type=“text/javascript” src=“swfobject.js”></script>
<script type=“text/javascript”>
    var flashvars = {
	page : "WRITEYOURPAGEHERE"
    };
    swfobject.embedSWF(“myContent.swf”, “myContent”, “300″, “120″, “9.0.0″, "expressInstall.swf", flashvars);

</script>

So now the swf files knows what page it is on, but it has to do something with it. When the flash loads it has to check in ActionScript for the variable that was passed to it in our case _root.page and display the good content section according to it.

The last thing you have to do is in the alternative content, make a link menu that links all html pages you created. This menu has to be in every html page of your site. You have to do this so that search engines spiders can access all your pages and index them.

What we did with this method is create multiples entry pages to your flash website instead of just one. Also this enables us to give a different title and description to each page which optimize those factors. With all this said, I can now explain why I call this the brute force method; this is not yet the best method to optimize your website for search engines. It will give you the same results as the next method, but will require more time as is harder to maintain since when you make a change in content in the flash file, you also have to do the same modification in the html page. The good point is that this method doesn’t require any server side scripting like php or asp.

, , ,

1 Comment


Really nice papervision3D website

While browsing the papervision3D blog, I found a link to the new site for the Canon EOS 400D. I can say that it is absolutely amazing. The design is really nice and papervision3D is used in a way that it adds to the experience, not just to show off some cool 3D. It is in fact very subtle and it is that subtility that makes it awesome. Papervision is really nice, but it has some flaws, like the edges of a plane are usually not that smooth, but in this site, they used Papervision3D in a way that it didn’t show. Well nice work!

,

No Comments


Finally something about SEO and Flash

I have been postponing this for a while but I think this is a good time for it now. This article will be the first part of a two part tutorial about how to optimize your website in flash for search engines. This tutorial is about the straight forward way of doing it involving no server side scripting. It is not the ultimate way to do it, but it sure is way better than doing nothing.

The first thing anyone interested in optimizing their site for search engines should do is read this article on seomoz.org on the topic. It is about how to optimize in html but a lot of thing that applies to html still applies in flash, read on to know why.

So if you read the article you will know that one of the most important factor is title of the Html page. The title in html is the text you see appearing in the blue bar at the top of your browser. That’s nice because with a flash based website, the title is still the html title, so you should give a lot of attention to it. And also it is really easy thing to modify. You should really think about the words you put in your title because you only have a limited number of words. Some say 60, some say more, I have a tendency to put more and let the search engines crop the end of them. Keeping that in mind put the most important key words first. Don’t just dump keywords, try to make sentences and slogans, search engines have been around for a while now, they know when you are trying to fool them.

Next thing you have to optimize is your text content. Google, and other search engines, cannot see in your Flash files (well I think now it can, but it sure cannot see dynamic text) so we have to find a way to make your text content accessible to them. It all happens in the html integration of your site. First, don’t use the default html page that flash, even flash CS3, creates for you. It’s just not good enough and there is a lot of bugs related to it. The best way to integrate a Flash is to use SWFObject. It’s so good that Adobe is even speaking with the makers of it to put it in the next version of Flash. Go read about it and check the examples, it is very well explained. The basic of SWFObject is that it will replace a div (or a td) using javascript by the proper Html to embed a swf. All the magic for us happens in the replacing of the div. Here is a sample code of how to embed using SWFObject:

<script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript">
    swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0");
    </script>
</head>
  <body>
    <div id="myContent">
      <p>Alternative content</p>
    </div>
  </body>

So you see, everything that is in the div with id myContent will be replaced by your swf file. You can also see the text Alternative content in there, this is where you are going to put all the text that is in your swf file. Think of it as a tune down version of an html page. So don’t just cut and paste your text in there; use p tags around paragraphs and most importantly h1 tags around your titles. In the article from seomoz, you can read that text inside h1 tags is also really good for search engines. So use it to put your titles and important text. Another good point of using this technique is that screen readers for blind peoples just as search engines will be able to read your alternative content. Well that is it for part 1 of this article, part 2 will be about creating more than one entry point to your site using either brute force or server side scripting.

, ,

7 Comments


SWFObject and SWFAddress again

Well this is just to tell you that SWFObject released the version 6 of their beta. I really hope they put the finishing to their code soon, my project which will rely on SWFObject and SWFAddress has to go live in January. Speaking of SWFAddress, they said that they were going to release version 2 November 16th. I don’t know how they can release it before SWFObject which it is based on, but maybe they have some inside information saying that SWFObject won’t change much until release. Anyway, we will see.

,

No Comments


New FlashDevelop beta version

This is just to tell you that there is a new version of the beta of FlashDevelop 3(ActionScript editor). There wasn’t any change since august 25th. I didn’t try it yet, but I soon will, it can only be better.

, ,

No Comments