I’m working on a script what populates an image gallery with an external Array.
When I’m checking the code i get an 1084: Syntax error: expecting identifier before leftbracket. at line 22 (marked red below)
when i relace the content of amfResults function with:
trace(result[1].file);
it shows the fetched external content.
init();
function init()
{
var net:NetConnection = new NetConnection();
net.connect(“http://www.sitename.com/amfphp/gateway.php”);
net.call(“AlbumService.getAlbum”, new Responder(amfResults));
}
function amfResults(result:Object):void
{
var objectNode:Object = result;
var image:Object = ;
var description:Object = ;
var beschrijf:Object = ;
var total = result.length;
for (var i= 0; i<total; i++) {
[COLOR=red]*image = result..file; **[/COLOR]
[COLOR=red]*description = result..bestelcode; *[/COLOR]
[COLOR=red]beschrijf = result.*.omschrijf;[/COLOR]
}
firstImage();
} else {
content = “file not loaded!”;
}
}