I’ve just read via the AXNA that Adobe, Google and Yahoo! worked together to allow SWF searchability. My first thought was ‘finally they made it’ :)

But while reading the FAQ I’ve been a little disappointed by how this indexation seems to happen:

[...]The Flash Player technology, optimized for search spiders, runs a SWF file similarly to how the file would run in Adobe Flash Player in the browser, yet it returns all of the text and links that occur at any state of the application back to the search spider, which then appears in search results to the end user[...]

FlashFlex

[...]All of the extracted information is indexed for relevance according to Google and Yahoo!’s algorithms. The end result is SWF content adding to the searchable information of the web page that hosts the SWF content, thus giving users more information from the web to search through[...]

So I’m afraid that it means that there will be absolutely ‘semantic’ information on the indexed tag. Is this text a title, a paragraph or an image caption? Does this mean that the SEO effort we have to do on SWF are only based on text and keywords?

If you have text with an Alpha of 0 but that have a tween, will it be indexed?

I’m very happy that A_G_Y are working to offer a better indexation and searchability of SWF but as far as I understand it, they are completely missing the SEO point here.

What do you think?

Ahmet

 

Some days ago I started using FMS (Flash Media Server). Obviously I wanted to write my project in AS3 and realized that they weren’t a lot of documentation on the topic, that why I’ll post here every part of code I made working.

My last project was about creating a chat. I downloaded the demo from FMS2 and tried to update it to AS3, not a big deal, but I’m happy that it works now.

FMS Chat Demo

I didn’t design it in OOP (object oriented programming) as it is only a simple demo, but I think it can be a good start for anybody starting using FMS with AS3.

I wrote 2 files, one .fla for the client and one .asc for the server.

The .asc file

//Fired when the application is loaded on FMS
application.onAppStart = function()
{
	trace(" *** FMS Application Started *** ");
	/**/
	// Get the server shared object 'users_so'
	application.users_so = SharedObject.get("users_so", false);

	// Initialize the history of the text share
	application.history = "Welcome to this chat!\n";

	// Initialize the unique user ID
	application.nextId = 0;

}

//Fired when a client connect to the server
application.onConnect = function(newClient, name)
{
	// Make this new client's name the user's name
	newClient.name = name;

	// Create a unique ID for this user while incrementing the
	// application.nextID.
	newClient.id = "u" + application.nextId++;

	// Update the 'users_so' shared object with the user's name
	application.users_so.setProperty(newClient.name, name);

	// Accept the client's connection
 	application.acceptConnection(newClient);

	// Call the client function 'setHistory,' and pass
	// the initial history
 	newClient.call("setHistory", null, application.history);

	// The client will call this function to get the server
	// to accept the message, add the user's name to it, and
	// send it back out to all connected clients.
	newClient.msgFromClient = function(msg) {
		msg = this.name + ": " + msg + "\n";
		for(var i=0; i < application.nextId; i++)
		{
			application.clients[i].call("msgFromSrvr",null, msg);
		}
		application.history += msg;
	}
}

//Fired when a clien disconnect from the server
application.onDisconnect = function(client)
{
	trace("disconnect: " + client.name);
	application.users_so.setProperty(client.name, null);
	application.nextId--;
}

Here we got 3 steps,

  1. application.onAppStart: is called when the application is loaded in FMS, it basically inform us that the application is ready to use.
  2. application.onConnect: is called when a client connect to this application in FMS, here is all the server logic to interact with the client(s).
  3. application.onDisconnect: is called when a client disconnect from the application or when the application is unloaded from FMS

The .fla is only the for UI (user Interface) and for the interaction with the server. If you have trouble understanding what is happening look at this code where I explain how to call functions from server side to client and from client to server.

I know it is not the state of the art in terms of chat but again, this is just a small demo on which complex interaction could be built.

you need to download FMS 3 free developer edition to start having fun with FMS.

Download the source of the FMS Chat

Ahmet

 

I had quite a hard time figuring out how to call a function hosted on FMS (an .asc file) and how to call a function on the client from the server. I’m new to FMS (Flash Media Server) and there is not a ton of documentation, updated, for ActionScript 3.0.

So here is a simple example of interaction between server and client function. Obviously you first have to install FMS on your computer (I used the free developer version of FMS 3).

Installed? Let’s start: we will need two files, a document class for your .fla and an .asc (server side ActionScript) file.

.as file (document class): Interaction.as

package
{
import flash.display.MovieClip;
import flash.net.NetConnection;
import flash.net.Responder;
import flash.events.NetStatusEvent;

public class Interaction extends MovieClip
{
// Responder for call to server's
private var myResponder:Responder = new Responder(onReply);
private var nc:NetConnection;

public function Interaction():void
{
//Constructor
nc = new NetConnection();
nc.addEventListener( NetStatusEvent.NET_STATUS, netStatusHandler );

// Connect to the server.
nc.connect("rtmp://localhost/Interaction");

//Allow method within th class to be called by the server side script
nc.client = this;

}

//Handle NetStatus
private function netStatusHandler( event:NetStatusEvent ):void
{
switch( event.info.code )
{
// Successfully connected to FMS, execute function
case "NetConnection.Connect.Success":
trace("connected");
callServerSideF();
break;
}
}

public function callServerSideF():void
{
//Call a server side function written on an .ASC file
nc.call("callFromClient", myResponder, "Server");
}

public function calledByServerSide(msg:String):void
{
//Function called by an .ASC file
trace("ASC have to say :"+msg);
}

// Responder function for nc.call()
private function onReply(result:Object):void
{
trace("Client have to say " + result);
}
}
}

Now the .asc file: main.asc

//Application is launched
application.onAppStart = function()
{
/* Allow debugging */
this.allowDebug = true;
}

//Client is connected
application.onConnect = function( client )
{

//Accept the connection
application.acceptConnection( client );

//Call the function calledByServerSide from AS3
application.clients[0].call( "calledByServerSide", null, "Hello Client :-)");

// Define new client function for a nc.call().
client.callFromClient = function( helloStr ) {
return "Hello Mr " + helloStr + ":-D~";
}
}

//Client disconnected
application.onDisconnect = function( client )
{
//Trace on the FMS Application console
trace( client+" is disconnected" );
}

Copy main.asc on your FMS application folder (I called it /Interaction/).

I was helped by a tutorial made by ‘Newtriks’ and published in WebDesigner magazine (files are available to download, issue 137).

Download the example.

Ahmet

 

Recently Digg made an official adoption of RDFa (a set of extensions to XHTML being proposed by the W3C). While watching a tutorial about RDFa (below video) I asked myself how it could be possible to do it for Flash/ Flex document.

In fact bringing RDFa to a SWF itself is not possible, as I far as I know, but if you use XSLT and XML to provide the data to your SWF then you can also add the RDFa extension into your content, very easily!

Some more explanation on how to embeded RDF attribute on a XHTML web page:

Ahmet

 

About a month ago, I checked the preparation guides page on Adobe.com for the ACE (Adobe Certified Expert) exam but none of the CS3 were online. Now this have changed and we can download all the preparation guides via Adobe.com.

That a good news as I have scheduled a test for the ‘Adobe Flash CS3 ACE Exam’ for the 16th of May :)

Does anyone know where to find other (free) preparation guides?

Ahmet

 

The discussion about SEO (search engines optimization) and SWF content(from Flash or Flex) has been long and turbulent.
Fortunately this discussion is coming to an end as now a proven solution exists. I made yesterday a presentation about it at the Adobe User Group of Geneva.

Here is the solution I prefer: using XSL (eXtensible Stylesheet Language) and transformation (XSLT) to rewrite an XML files containing data used in the SWF. As a result we got an HTML file for the search engines and a SWF for the human. Not clear?

SEO for SWF via XSLT

This diagram shows how XSLT is central to all the work.

How does it work?
You will need 3 files:
1) a .XML
2) a . XSL
3) a . SWF
Continue reading »

 

AUGG Event
During our next event at the Adobe User Group of Geneva I will make an introduction to SEO strategies and the best practice to extend them to SWF powered content. This presentation could also be named SEO for Rich Internet Application. As it is just an introduction I’ll try to make it in 30 minutes maximum…

The second presentation will be made by Cédric Tabin about Remoting with AS3 and AMFPHP.

If you are in Geneva our around, you are more than welcome (just ping me if you stay for the pizza: hello AT augg DOT ch)!
The event takes place at our friends local, the Nomades.

Looking forward to meet you there :)

More information about the event.

Ahmet