Page 1 of 1
how to make flash show a data in my database?
Posted: Thu Oct 24, 2013 11:30 am
by coLz
how to make flash show a data in my database? like printing the name of that user showing it in flash after he logs in. code please. thanks =)
Re: how to make flash show a data in my database?
Posted: Thu Oct 24, 2013 5:53 pm
by MikuzA
Hello,
You mean Flash, as in .swf?
Have never done that before but I would guess you could call a php-page with actionscript and just display it.
Re: how to make flash show a data in my database?
Posted: Sat Oct 26, 2013 10:31 pm
by Jackolantern
Yes, it would require something on the back-end to retrieve the data to display it. PHP, Java, node or any other back-end platform could do it. I am only vaguely familiar with doing this, so unfortunately I can't help you on the code.
Re: how to make flash show a data in my database?
Posted: Mon Oct 28, 2013 8:43 pm
by hallsofvallhalla
It would be just like ajax
Code: Select all
var loader:URLLoader=new URLLoader();
var myrequest:URLRequest=new URLRequest("http://localhost/whatever.php");
loader.addEventListener(Event.COMPLETE, onLoaded);
loader.load(myrequest);
inside whatever.php you would run the mysql code to get the data you want then echo it out at the end.
You would then use that flash variable to do whatever.