///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);
Wednesday, May 14, 2008
AS3 XML E4X
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
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
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
Subscribe to:
Posts (Atom)