Hi,
Sephiroth had some nice stuff about working with AMFPHP, I remember his
setup tutorial was quite useful, but later releases of AMFPHP got better
at this - just unzip, change your gateway.php to point at the right
place, then look in some of the folders under there for the service
browser etc:
http://www.sephiroth.it/tutorials.php
Getting the Flash AS2 side was a bit of fun - you need the extra
remoting classes - outlined in Sephiroth's tutorials installed, which
can be fun to setup I believe...
http://blog.vixiom.com/2007/04/17/actionscript-20-flash-remoting-with-flash-cs3/
The datagrid example I mentioned is here:
http://flash-creations.com/notes/servercomm_remoting_amfphp.php
I also know the Flash-DB site has some tutorials for AS2 & AS3 that look
powerful:
http://www.flash-db.com/Tutorials/hello/flashamfphp.php
To be honest, I played around with the server side code quite a lot
myself to learn - you can write examples to handle all the helloworld
and echo test in Flash, then play with some of the ideas above... The
"ServiceBrowser" is an invaluable tool for helping you setup your PHP
stuff server side - it will soon tell you if there are errors in your
PHP code that you might spend hours looking for in Flash. I also used to
write very simple PHP scripts to test my server side methods and check
the code was working okay. Also invaluable is using NetDebug::trace()
which passes debug information back to Flash along the remoting
connection - sprinkle liberally throughout your code and use the
Remoting Debugger or some kind of http-proxy like Charles, etc. to see
what gets spewed out. I have not done this for a while now, so not the
best person to ask maybe :)
Once you get the hang of writing services, it gets easier. There also
used to be a nice code generator when Aral did the AMFPHP + ARP demo
stuff which would generate AS stub code for your Flash client side, but
to be honest that got in the way of learning a bit and I shied away from
using it much after sussing out the stuff produced...
If you are looking at integrating with a back-end system, the Drupal
AMFPHP module lets you expose your Services via AMFPHP, which can be
configured in the Drupal Admin area. This kind of gets you away from
getting your hands dirty server-side, so is not ideal.
http://groups.drupal.org/node/2768
If you are a fan of other frameworks, or systems, they generally have
some tutorials for getting things going. I remember trying to setup with
CakePHP - that was a pain.
Some of the code is a bit old for the Flash side of things now, but the
PHP stuff is generally still quite relevant, although most of the
Services tend to be written in quite a non-modular way.
A lot of the Flex stuff works out of the box with Remoting now - look at
some of the examples, quite easy to setup a remoting connection and
define your result handling. It's what you do with the data that's
important.
I also just found this ready-rolled framework for AS3 remoting on
OSFlash - http://osflash.org/as3lrf The example sets out your "standard"
pattern for handling a remote method call to a server method which can
help you build. I have not spent any time messing with PureMVC, etc. but
thinking they may provide stuff to handle your "service" bit, or maybe
some examples (I would hope so...)
HTH a bit
Get the AMFPHP code, unzip to your LAMP server, visit the gateway.php
page to see the message then follow the link to the service browser...
Glen
Gustavo Duenas wrote:
Hi guys, I've pick this curiosity about amfphp since I'd like to use
it on my websites, Does anyone of you knows a good tutorial of it,
rather than the one in the amfphp website? that tutorial seems for me
not easy to understand or follow, is so simple, maybe some example
about how to make a repeater in as3 or reading info from a mysql
database on a URLLoader in flash as3, any help would be appreciated on
this end.
Regards,
Gus
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--
Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders