# AMFPHP vs Flash

**URL:** <https://forum.kirupa.com/t/amfphp-vs-flash/319750>\
**Category:** flash\
**Created:** [March 3, 2011, 7:41am UTC](https://forum.kirupa.com/t/amfphp-vs-flash/319750 "2011-03-03T07:41:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WILWILWEL](https://avatars.discourse-cdn.com/v4/letter/w/a88e4f/32.png) [@WILWILWEL](https://forum.kirupa.com/u/WILWILWEL)\
**Post date:** [March 3, 2011, 7:41am UTC](https://forum.kirupa.com/t/amfphp-vs-flash/319750/1 "2011-03-03T07:41:36Z")

</div>

Since I got stuck with the photogalley arrays im trying AMFPHP.

The AMFPHP site works like a charm. But now i get the next syntax error in Flash and i can’t see whats wrong.

error:

> Scene=Scene 1, layer=Layer 1, frame=1, Line 16 A type identifier is expected after the ‘:’.

as2 script:

> 

init();

function init()  
{  
// setting up NetConnection  
var net:NetConnection = new NetConnection();

// making connection with the AMFPHP gateway  
net.connect(“[http://www.sitename.com/amfphp/gateway.php](http://www.sitename.com/amfphp/gateway.php)”);

// getData call within thePHP class: AlbumService  
// Responce calling and handing throught the results to amfResults

net.call(“AlbumService.getData”, new Responder(amfResults));  
}

[COLOR=red]**function amfResults(result:Object):void //= line 16**[/COLOR]  
{  
// trace the 2nd child of the array and display the field “file”  
trace(result[1].file);  
}
