Wednesday, May 14, 2008

AS3 XML E4X


///XML EXAMPLE
var myXML:XML=<books><book cod="1" >
<title>ActionScript 3.0 Cookbook</title></book></books>;
trace("original xml: "+myXML);
///NAVIGATE NODE
trace('title node : '+myXML.book.title);
///READ ATTRIBUTE
trace('read cod attribute : '+myXML.book.@cod);
///ADD CHILDNODE
var newNode:XML=<book cod="2" >
<title>ActionScript 3.0 Bible</title></book>;
trace("add book node "+(myXML.book+=newNode));
///SELECT A NODE BY EXPRESSION
trace("select node with cod==2 "+myXML.book.(@cod==2));
///SELECT A NODE BY INDEX
trace("select first node "+myXML.book[0]);
///GET LENGTH
trace("get length of XMLList "+myXML.book.length());
///DELETE NODE
delete myXML.book[0];
trace("delete node "+myXML);

Tuesday, March 04, 2008

As3 WHere aRe FLASHVARS?!?!?!?!

nevermind _level0[value] now flashvars are in parameters object in the istance of the main class of your SWF.
I write a simple class that return flashvars & swf querystring from value
source

As3 Load XML file - custom event driven

From my project base set.

download source

ps: in the source i used classes from the package luca.baseSet.*, i usually consider them like "abstract" classes, i always extend them and using the subclasses

Monday, September 11, 2006

Second experiment with floodFill and tolerance (sssspeeddd)

Second experiment with floodFill and tolerance
improve algorithm (sssspeeeeddddd)


New security model - Flash 9

Flash 9 Player introduce a new security model, the basic concepts are:
- Resources in the same security sandbox (local or network) can always access each other .
- Resources in a remote sandbox can never access local resources

Now the flash player checks for "exact domain" so:

http://a.com
http://www.a.com
http://www.a.b.com
https://www.a.com

are different sandbox.
You can bypass the sandbox using cross domain xml and Security.allowDomain() method

source:
http://www.adobe.com/devnet/flashplayer/articles/flash_player_9_security.pdf

Thursday, September 07, 2006

CreaAvatar - Make your Avatar with Flash

After 2 months of work, finally is online
creaAvatar
With this application you can create your avatar and then generate the image file (jpeg).

Flood Fill Tolerance AS3 - First Experiment

First experiment with floodFill and tolerance