Page 1 of 1

PHP & MYSQL with FLASH

Posted: Thu Feb 24, 2011 11:34 am
by VZdemon
i'm planning on making a browser rpg game much like the on in halls tutorials but i want to also blend the system in with flash to make instant and realtime gameplay. Is this possible? if yes is it possible for a medium level php programmer?

thanks

Re: PHP & MYSQL with FLASH

Posted: Thu Feb 24, 2011 1:55 pm
by Xaleph
Sure, why not? The PHP part is not going to be that hard i believe. Flash is something you really need to look into. I`m not into flash, but many here are, so best wait for a reply from them. They`ll recommend some books and such.

Re: PHP & MYSQL with FLASH

Posted: Thu Feb 24, 2011 3:00 pm
by hallsofvallhalla
as far as hitting the database with flash I am quite sure there is something built in. You could also just have flash call a php page to update the database. I am sure it has a response listener for echoing results.

Re: PHP & MYSQL with FLASH

Posted: Thu Feb 24, 2011 10:05 pm
by Jackolantern
Honestly, Flash and PHP cannot easily be married in a way that will let them add considerable value together to your game. Flash works in a "sandbox" style that keeps it pretty much hands off the rest of the webpage, and with good reason. Since you can't easily see the code of Flash like you can with Javascript, malicious users could use tiny-stage Flash apps to secretly collect all kinds of info on users that they enter into their browser and send it back to a server through its socket functionality. Of course that is just one scenario, but that is basically the reasoning behind Flash being restricted in the page it runs in. Most Flash-to-PHP functionality is actually about Flash either calling PHP web services, or running PHP scripts on the backend. I suppose you could get clever with this type of setup, and have combat appear in its own page and call updates to the database which a subsequently loaded page will then use (giving the illusion that the Flash and PHP app are working together), but this has its limits and is seen pretty rarely online. Most web devs just go 100% Flash or 0% Flash since Flash cannot integrate the way we would all like for it to in a perfect world.

On a related note, Silverlight can interact with ASP.NET a bit better than Flash can with PHP, but still not enough to actively use the RIA platform for real-time features embedded in a server-side game. Also, BlazeDS probably gives the best connectedness between Flash/Flex and a server-side platform. However, it uses Java for the backend.

EDIT: Ohh, and if you are still wanting to move forward with Flash/PHP integration, here is the best book out there on the subject. Don't be a fool like me and buy this one, because, even though it was published in 2010, it covers ActionScript 2.0, and really, really should have never been released :evil: (a pretty good reason why it sells for under $2 used on Amazon).

Re: PHP & MYSQL with FLASH

Posted: Fri Feb 25, 2011 5:41 am
by Ravinos
I have had some good success with Flash AS3.0 and php when I was toying with Flashing my game. As a good starting point you really need to sit back and learn AS3.0 before putting the two together. This will save you a lot of headaches and broken mice.

The following tutorials helped me a lot with learning to do both at the same time. http://www.avelx.co.uk/vms/members/flas ... course.php

You will need to register to get access. http://www.avelx.co.uk/vms/

Re: PHP & MYSQL with FLASH

Posted: Fri Mar 11, 2011 12:36 pm
by VZdemon
Jackolantern wrote: EDIT: Ohh, and if you are still wanting to move forward with Flash/PHP integration, here is the best book out there on the subject. Don't be a fool like me and buy this one, because, even though it was published in 2010, it covers ActionScript 2.0, and really, really should have never been released :evil: (a pretty good reason why it sells for under $2 used on Amazon).
thanks man you saved me big time. :D

Re: PHP & MYSQL with FLASH

Posted: Fri Mar 11, 2011 5:06 pm
by Jackolantern
That book has pissed off a lot of people lol. Why make an AS2 book in 2010?! lol

Re: PHP & MYSQL with FLASH

Posted: Sat May 07, 2011 3:40 am
by Baseball435
Look up flashbuilder on YouTube. He Is just starting a tutorial on how to do this and all of his videos are great and so far this one is too.

Re: PHP & MYSQL with FLASH

Posted: Sat May 07, 2011 4:00 am
by Jackolantern
Baseball435 wrote:Look up flashbuilder on YouTube. He Is just starting a tutorial on how to do this and all of his videos are great and so far this one is too.
The IDE or a person? May be kind of hard to look up "flashbuilder", because you will find hundreds of videos about the Adobe product of the same name.

Re: PHP & MYSQL with FLASH

Posted: Sat May 14, 2011 1:33 pm
by Mustardy
I am interrested in this too, but i herd you have to get cold fusion involved or something