Archive | AS RSS feed for this section

Abrir URL desde SWF dentro de Facebook

16 Aug

Facebook ha establecido que dentro de sus aplicaciones en FBML, el método nativo para abrir una nueva página en el navegador (navigateToURL en AS3, getURL en AS2) sea inservible. Sin embargo, FB propone un método propio que consiste en mandar llamar la variable fb_local_connection que el embebido de FBML inserta en el SWF.

De esta forma, podemos sustituir la llamada tradicional así:

var connection:LocalConnection = new LocalConnection();
var connectionName:String = LoaderInfo(this.root.loaderInfo).parameters.fb_local_connection;
function go(url:String):void {
if (connectionName) {
connection.send(connectionName, “navigateToURL”, url);
}
}
go(“http://element.com.mx”);

De acuerdo con el wiki de FB, esta es la única llamada posible que no involucra FBJS (el Javascript de Facebook) :)

Flash encryption and PHP decryption

10 Feb

I was looking around for some encryption/decryption methods in flash that works also with PHP. And I found some interesting websites with a simple explanation. The first one is a simple XOR encryption/decryption inside flash.

http://blog.yofla.com/2009/03/as3-encrypt-and-decrypt-textxml/

The second website I found uses the as3Crypto library and decrypts it on the server side using PHP. The links for the explanation and the library the use are here:

http://www.zedia.net/2009/as3crypto-and-php-what-a-fun-ride/

http://code.google.com/p/as3crypto/

The third website I found is also interesting and has some data service libraries for Flash, Air and PHP:

http://code.google.com/p/as3-to-php-aes-dataservice/

This last one is based on some JavaScript functions found on the following page. This could be usefull with AJAX like applications.

http://www.movable-type.co.uk/scripts/aes.html

New Font and TextField system in Flash CS5 and Flash Builder 4.

9 Feb

Last week I found some interesting information about a new engine being made for CS5 and Flash Builder 4. This will support better fond embedding and new elements inside a TextFlow ( new TextField ). It has support for LinkElements, ParagraphElements, DivElements, InlineGraphicElements and also a new layout for Japanese text markup based on the w3.org standard. Here are some links with more information:

http://cameronyule.com/2009/02/embedded-fonts-and-the-text-layout-framework
http://www.allmas-tn.com/2008111710/gumbo-using-embedded-fonts-with-the-new-text-primitives.html
http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/
3/flashx/textLayout/elements/package-detail.html

http://www.w3.org/2008/Talks/0909-jltf-iuc32/

Para insertar swfs

5 Feb

Hola!
Para embeber swf en los posts, está instalado el plugin WP-SWFObject en el blog:

  1. Subir el swf al servidor. Se puede usar el botón de “Add Media” que está arriba de las herramientas de HTML de “Insertar post” y copiar la liga, o tenerlo en cualquier otra ruta.
  2. Insertar el siguiente tag: [SWF]miarchivo.swf, ancho, alto[/SWF] con los datos correspondientes (Ejemplo: [SWF]http://element.com.mx/media/7762.swf, 231, 132[/SWF])

Hay un ejemplo en los drafts del blog, por si se necesita.

Hola mundo!

4 Feb

echo “hola mundo!”;

alert (“hola mundo!”);

trace (“hola mundo!”);

print (“hola mundo!”);