Using the Flex profiler with a Flash Website or Application

September 11th, 2008

Ted Patrick posted on is blog a video of a presentation that was made at 360 Flex about the Flex Builder 3 Profiler by Jun Heider. It’s a pretty interesting talk about some unknown feature and tweaks of the profiler. One of the thing I learned that I am really happy to have found was the fact that you can use the profiler on a project that wasn’t made using the Flex Builder,  for example a project made in the Flash IDE. Here are the three simple steps you have to do.

In FLEX

  • Go to the Profiler view and in the Profile menu select “Profile External Application”
  • In the window that will prompt, select the radio button Launch the application manually outside Flex Builder

In Flash

  • All you have to do in Flash is to run the debug version of your movie (”Debug Movie” in the Debug menu)

That’s it, the Profiler will kick in for your Flash application.

Now I don’t see any reasons to use Flex anymore.

Flash and Flex SEO experiment part 2

August 7th, 2008

I had previously made an SEO experiment to see what in Flash and in Flex was getting indexed by Google and I was able to get some results. Well, I decided to push the experiment further so I created seven new test cases both in Flash and in Flex. I have to warn you that I am more proficient in Flash than in Flex so my Flex test cases might be a bit off. Here are the new test cases (numbers start at 8 because I have already made 7 test cases):

Flash8.  Static texfield embedded in the HTML using SWFObject 2.0

Link :  http://www.fleximagically-searchable.com/fleximagically-searchable-v8/

Expected result: I really don’t know, some rumors say it gets indexed anyway, Google says it doesn’t; this will shed some light.

 9. Multiple static textfield on different frames

Link :  http://www.fleximagically-searchable.com/fleximagically-searchable-v9/

Expected result: From what I have seen before, Google will index the multiple texfields as if it was one text, so you could write a text with one word on each frame and it will appear as one.

10. Dynamic textfield prefilled with content after a preloader on the first frame

Link :  http://www.fleximagically-searchable.com/fleximagically-searchable-v10/

Expected result: I did this to see if the preloader would prevent the content from being indexed. Since Google is able to index Flex content with the default preloader, I think this test case will get indexed.

11.  Dynamic textfield outside the viewing area

Link :  http://www.fleximagically-searchable.com/fleximagically-searchable-v11/

Expected result: I read that this was working, but with the new special player it shouldn’t. Let see what happens.

Flex

12.  Simple custom MXML component

Link:  http://www.fleximagically-searchable.com/fleximagically-searchable-v12/

Expected result: I saved a Text component in its own MXML file and used that file in my main application. I think this will work because logically it’s like writing the second file(custom component) in the first one (application).

13.  Using States

Link :  http://www.fleximagically-searchable.com/fleximagically-searchable-v13/

Expected result: I don’t think any of the content from this swf will be indexed because states use the words addChild in its mxml and I think(logically) this gets translated into the addChild function in AS3 and content added using addChild doesn’t get indexed.

14. Using the ViewStack component

Link :  http://www.fleximagically-searchable.com/fleximagically-searchable-v14/

Expected result: I think this has more chances to work than states but since this is a more complex component than the Text one I cannot say for sure.

Now that everything is set up, we just have to wait for Google to crawl those pages. The results and a general recap of the experiment will be posted in an article on InsideRIA.

Google is not indexing your dynamic content in Flex or Flash

July 24th, 2008

It’s a pretty shocking title with all the fuss about the new flash player for Google and Yahoo, but I will try to explain why I came to this conclusion. I suggest you read about the seven test cases I did because that’s mostly what my reasoning is built on. I am going to explain point by point what happened in the experiment.

My first test case was simply to put static text right on the first frame of the swf file. That’s all this flash file contained. If you search in Google for the unique expression contained in that static text, you will find the specific html embedding the swf, meaning that the content was indexed.

The second test case was similar to the first one except that instead of being a static textfield on the stage, it’s a prefilled dynamic textfield (meaning the text in the textfield was added using the Flash IDE not ActionScript). Again for this case if you search the unique expression, the good html page will come up (As for the first case, you see in the description in Google for that link the extract of text containing the expression furthermore proving that the content was indexed).

The third test case was also a dynamic textfield, but the text in it was added using ActionScript. The page is indexed in Google (do a search for ’site:www.fleximagically-searchable.com “fleximagically searchable”‘ and click “repeat the search with the omitted results included” at the bottom of the page to see all test case indexed) but the content doesn’t show in the description of the link. Also if you did a search for the unique expression nothing relevant would come up.

The fourth test case, the last done in Flash, was a static textfield inside a Sprite added to the stage using ActionScript. Again for this case the html page is indexed, but none of the Flash content is.

The fifth test case, as all of the next test cases, was done in Flex, it’s a TextArea component in mxml filled with the text attribute in the mxml, so no ActionScript involved. In this case, if you search for the unique expression you will see that the content inside the swf is indexed, proof that some content in Flex can be indexed.

The sixth test case is a Label component in mxml filled with the text attribute int the mxml. In this case, the content didn’t show up on Google, so I guess not all components are indexable.

Lastly, the seventh test case is a Text component in mxml filled with content using the text attribute in the mxml. I think this case is really similar to the second test case; a dynamic textfield in Flash prefilled with content. In this case, the content showed up on Google, so the swf was indexed.

My conclusion

From this SEO experiment, we see that static textfields on the timeline, prefilled dynamic textfields and some basic Flex components (TextArea, Text) in mxml are indexed by Google. It seems to me that as soon as there is ActionScript involved to change the content, that content will not be indexed. If you look back a bit, you kinda see that Google doesn’t use any new Flash player to index swf files, it does what it always was doing; nothing new. If somebody has a proof of dynamic content being indexed by the new player I’d be glad to see it, but for now I am assuming that Google is not using the new player given by Adobe.

This brings us to the Flex Seo contest, where my Fleximagically Searchable entry is performing well, but my content is not indexed. My take is that this contest will be pretty hard to win. There might still be possibilities to make this work but I think they are a bit too far fetched. Here is what I think might still have some chances: I did all my experiments with ActionScript 3 and I believe from the results that you cannot win using ActionScript 3. Where there could still be some opportunities would be if the swf generated would be using ActionScript 2 (which would use the flash player virtual machine 1), so in order to win the contest, you would have to build your Flex application in Flex 1.5 or even before. This would mean that the new special flash player for Google would only work for Flash 8 and below. I really hope it is not the case and that it is just that Google is not using the special player yet.

Another way to win would be that Google roll out the new player before September which is the ending date of the contest. Let’s hope they do so!

Flex SEO Contest; I’m running out of titles

July 16th, 2008

All my latest post have been about the Flex SEO contest, I’m sorry for those that don’t have interest in it, but I find it very challenging and fun.

From all the information that I have gathered from the web I have new insights about how to win this contest. If I was one of the other contestant of the contest I’d be sure to read my blog because I am giving info about how to win this contest all the time.

There are two major facts you have to know. First Google doesn’t index flash files that are embedded using JavaScript (I got this from different sources and Google itself). They are planning to do it, but it’s not implemented yet. So if you want to have a shot at winning, start by embedding your flash the old fashion way with embed/object tags. Secondly, even if the special flash player is able to read data from external source (XML, server side scripts, loaded SWF), Google is not indexing those as a part of the swf file. So you’ll have to use a different way to load your dynamic content (that doesn’t leave so many possibilities).

Another interesting fact is that for searches with the filetype swf (filetype:swf) Google is giving some importance to the url and the filename of the swf file. So if I really wanted to make things right, I would rename my Flex application for the contest fleximagically-searchable.swf, but I’ll wait until my content is indexed.

So in the light of these facts, I have modified my fleximagically searchable Flex application, go and have a look, it’s a so exciting application.

Converting this contest into a SEO experiment

July 14th, 2008

From previous posts you know that I am participating in the Flex SEO contest. I got my page pretty high on Google, but it still doesn’t seem to be finding my content. There are still a lot of unknown about this new SEO technology that Adobe, Google and Yahoo worked on and I think that to make a Flex application that load the content dynamically is to go a bit too fast.

So with that in mind I made simpler swf files. I even made some using Flash to see what would get indexed and how. In each of my experiments I have included a unique search expression basically formed from Fleximagically Searchable plus another word. If you search Google with that expression and one of my experiment shows up, it means Google indexed the content. Here are my experiments:

Flash:

We don’t even know what type of swf is or is not indexed by Google so I sat down down and I made the simplest ones. Since Flex is pretty complex, I made some files using Flash.

The first one is only a static textfield right on the timeline. we know Google used to index those files, let’s see how it does it.

http://www.fleximagically-searchable.com/fleximagically-searchable-v1/

The second one is still in Flash using a prefilled dynamic textfield.

http://www.fleximagically-searchable.com/fleximagically-searchable-v2/

The third one is using a dynamic textfield again filled using ActionScript.

http://www.fleximagically-searchable.com/fleximagically-searchable-v3/

The fourth one is using a static textfield added to the stage using ActionScript.

http://www.fleximagically-searchable.com/fleximagically-searchable-v4/

Flex:

Since we don’t know if Flex files get indexed at all, I made three simple experiments using basic components: TextArea, Label, Text. In those experiments the content is filled using the text attribute in the MXML file.

Flex file using TextArea.

http://www.fleximagically-searchable.com/fleximagically-searchable-v5/

Flex file using Label.

http://www.fleximagically-searchable.com/fleximagically-searchable-v6/

Flex file using Text.

http://www.fleximagically-searchable.com/fleximagically-searchable-v7/

Now let’s wait for Googleto crawl these pages and then we will be able to better understand how this all works.

More on the Flex SEO contest

July 11th, 2008

If you have been following this blog, you know that I entered the contest to get a Flex application on the top of Google for the words “Fleximagically Searchable”. The next logic step was for me to add deep-linking to my application, but it’s not what I am going to do. Why you could ask? Because even if the webpage for my application is appearing on Google, the content itself doesn’t seem to be included. So there is no meaning of implementing deep-linking if my content won’t be found.

There have been rumors around the fact the Google would not reference website that use javascript to embed the flash file. Peter Elst seems to think the contrary but I think it is worth a try. I was previously using SWFObject to embed my swf because I had in mind to use SWFAddress for the deep-linking, but now if you do a view source of my Fleximagically Searchable application you will see that I am using the good old Object and Embed tags. Let’s see what Google think of the new page.

Update on the SEO contest

July 9th, 2008

I have set my self up for Flex application development and thanks to this post about how to use Flash Develop and Flex, I was able to do so quickly.

Yesterday I had simply created the HTML pages that would hold my application, today I created the application itself. It is quite a simple application and it is clearly a Flex one because of the skin of the components ( a button and a textarea). This will serve as a base for what is to come. The next step is to create the deep-linking. It has already some kind of deep-linking in the sense that you can go directly to this Fleximagically Searchable page. This page loads exactly the same swf than the page at the root of the domain, but I pass it a variable using SWFObject to tell it to load the content. If Google find any searchable content in any of those two pages, it means it comes from the dynamically loaded content because I removed everything in the HTML code except for the title of the page.

From what I did yesterday I am already getting some results, the new domain name I bought is scoring a ten (it is the tenth page for the term Fleximagically Searchable) and all the pages before it are blog posts (including one from this blog) that will not count in the contest so I guess I have my chances. Let’s see how it all evolves.

I will participate to the Flex SEO contest

July 8th, 2008

When I saw Ryan Stewart post about the Flex SEO contest this morning, I could not wait to get home to start working on this. The trouble is: we are currently working really hard to get a project out and I don’t really have time… There is always ways to find time, but taking crystal meth is not the best one. Since this is something I really do well I think I am going to put some energy into this.

I have written some SEO post in the past and I am way better at programming Flash then Flex but Ryan mentioned the possibility to win a pass for MAX, the Adobe conference, which I would really like to attend, so I think this is worth it. The goal of the contest is to create a Flex application that Google will index as the first link for the search terms : fleximagically searchable.

In order to do this I bought a domain name which has some advantages and some disadvantages. The domain name is http://www.fleximagically-searchable.com. Well the advantages are quite obvious, the domain name contain the search terms. This domain name also has a disadvantage, since it’s a new domain name, Google will sandbox it, meaning that it won’t be really searchable until about 6 months. You’ll be able to find it if you enter the exact address in Google, but it won’t have much weight against older site. I think I might try this on another domain name that I possess and is out of the Google sandbox, but for now, I’ll just try with this one.

Right now there isn’t much on the website but I will soon put the flex application there. I wanted to create the pages and this post now because the age of a page is one of the factor that Google uses to rank pages.

I find the rules for the contest not so clear, I don’t really now what I can and what I can’t do, but I’ll try stuff and we will see what happens.  I will keep you posted on this.

Difference between MouseEvent.ROLL_OVER and MouseEvent.MOUSE_OVER in AS3

June 19th, 2008

This was a question that has been in my head for a long time: what is the difference between MouseEvent.ROLL_OVER and MouseEvent.MOUSE_OVER. I have been using MouseEvent.MOUSE_OVER for all my rollOvers up to now without really thinking about it, but I think it would be interesting to know the difference for something so basic.

If you look at the documentation that comes with Flash CS3. You will find very little help. There are no examples explaining the difference between the two. The only difference you will find there is that the MOUSE_OVER event has the bubbles property set to true and the ROLL_OVER to false. I don’t know how much that property impacts on the behavior of the event, but I am keeping event bubbling for another post (I have been postponing that post for a long time).

Where I found there was a difference between the two events is in the way they handle children of the display object you added the listener too. I have made a simple example to show this:

In that flash example, be sure to roll over the blue part of the button to really see the difference(note that the blue rectangle is inside the black rectangle movieClip, not just over). In the MOUSE_OVER example, the event is fired for every children of the display object that the listener was added to. This does not happen with the ROLL_OVER event. If you move your mouse from the exterior of the button to the blue part MOUSE_OVER will generate 3 times the events that ROLL_OVER will. One way to make MOUSE_OVER act as ROLL_OVER is to set mouseChildren = false but as a consequences: the first is that it will disable all mouse events from children which I think might help the CPU but at the same time you won’t be able to interact with the children with the mouse.

In our previous example, it didn’t really matter how many events where fired because we used a tween to do the rollover and we weren’t able to see the difference visually, but there might be times where you will want all the different events. Like if you want the mouse cursor to change when over a movieClip and still want rollOver effects from children of that movieClip, you would use the MouseEvent.ROLL_OVER to change the mouse cursor and MouseEvent.MOUSE_OVER for the children movieClips rollOver effects.

As a side note on cpu efficiency, it doesn’t really matter if you listen to  MouseEvent.ROLL_OVER or MouseEvent.MOUSE_OVER events, they are both as efficient. What will save you cpu cycles is if you disable the children of a movieClip from sending events if you don’t need them (even if you don’t listen to them events are still fired) using mouseChildren =  false.

I hope this shed some light on the subject.

Flash Freelancer wanted

June 5th, 2008

TwistImage, the company I work for is currently looking for a freelancer for a small project. That project is a small game and is not very complex, but it would require some skill in ActionScript 2 (intermediary level). The freelancer would have to be free the next two weeks (we need this project fast) and would have to communicate with our office every day to report on progress. If you think you have what it takes for the project send your portfolio or some of your work to mario [at] twistimage.com.


Close
E-mail It