PDA

View Full Version : How to do this in AS3?


iceflyin
07-25-2007, 04:45 AM
I am able to pull variables out of an object send from amfPHP to flash MX, via...

//Get object via amfphp and pull out the variables via the code below:
trace(Result.items[i].description); //Results in 'blah blah the description descripion blah"

Now, for the life of me... I can't get it to work in CS3...


gateway.call("lastRSS.Get" , new Responder(catsResultHandler, faultHandler), "http://blog.somewebsite.com/blogname.xml");
//Blog name removed above
function catsResultHandler(result:Object):void {
var catsData:Object = result;
}

Now, ALL I get from trying different traces is "Undefined" or, object Object object Object object Object.... Is there a different syntax now?

trace (catsData.items1.description); results in "undefined".





//My code that works correctly for parsing in MX:
for (i=0; i<Result.items_count; i++) {
blogList += "<emph><a href='"+Result.items[i].link+"'>"+Result.items[i].title+"</a></emph>"+newline;
blogList += Result.items[i].pubDate+newline;
blogList += "<highlight>Excerpt: </highlight>"+Result.items[i].description+newline+newline;
}*/