View Full Version : I need some expert help on integrating flash with online data storage.
Bodadem
06-11-2005, 08:58 PM
First off; Don't post if you're a n00b. Don't post if you don't have an answer, unless you need more information to be able to properly answer my question. Thank You.
Okay, here's basically what I want to do; I want to have a flash form which allows users to put in a nickname and a message, and when they hit 'send', that information will get sent to some form of text storage which will add their text and nickname (in the format of; Nickname: text text text) to the top of that text. I know how to do it strictly wish AS (quite simple) however I do not know how I would go about loading/outputting text remotely.
I'm not looking for any sort of username/password system, just how I would load/output text from/to some sort of text storage online.
If someone could either just point me in the right direction, or, if you're up to it, give me an explanation of how I would do it, I would be greatly appreciative.
Freddy
06-11-2005, 09:24 PM
This is for your sig right?
well either way, I want to know too. sounds intersting, and I can use this for another thing I was thinking of.
Bodadem
06-11-2005, 10:49 PM
First off; Don't post if you're a n00b. Don't post if you don't have an answer, unless you need more information to be able to properly answer my question. Thank You.
:P.. You're lucky I like you, shadow.. But aye, this is for my sig, which is obviously still in the planning stages.. I'm forced to get around a large obstacle if this is to work successfully (no, it not the code..).
bluestriker
06-11-2005, 11:20 PM
It looks like it works fine to me....or are you having it store in the .swf and you want it to store on a website instead?
Bodadem
06-11-2005, 11:37 PM
First off; Don't post if you're a n00b. Don't post if you don't have an answer, unless you need more information to be able to properly answer my question. Thank You.
... Suck at following instructions, much?
Yes, as of current, that saves locally (on your computer). My goal is to reproduce some sort of 'shoutbox' or even a chat, which requires that the information be kept remotely (on the internet)..
bactac
06-12-2005, 04:48 AM
If you want a chat, look at http://www.sephiroth.it/tutorials/flashPHP/flash_chat/
and a shoutbox, http://greycobra.com/tutorials.php?tutorial=view&id=55
i can be n00b but even google is best than everything
arkhan
06-12-2005, 08:54 AM
well..I had a swf and a lil java file that used to do that on your machine and you could use it online as well..but I cant find them..Ill find it later...all it did was, every time the SWF from that page was loaded, it was added to a list of them, and when a msg was sent, it replyed to every open SWF..
you can also do it with PHP/ASP...
all you need is a PHP/ASP page to wich messages will be sent..and then making it reply to the opened flashes.I have never done it..but you might need MySQL or another database to do it...
if you want some help, just call me..im kinda interested on it..
Bodadem
06-12-2005, 09:32 AM
LOL! You sig'd me! Heh.. Erm, kay, do you have AIM, or MSN, arkhan? I don't have ICQ..=\
Thanks for the links, bactac, I'll take a look.
denacioust
06-12-2005, 01:59 PM
Have you ever seen XSDSX's (Nexus) scoreboard he made a while back for me and the Brown Cow? It worked basically on the same idea you're at here, you send out a variable along with a name to a text file and then a PHP file would arrange it by score. You could then reload all the Variables back into Flash very easily. I could try find it for you, if you still need it.
Bodadem
06-12-2005, 02:28 PM
BTW, Jonanin is helping me put this together. It should be done fairly shortly!
bluestriker
06-17-2005, 07:28 PM
First off; Don't post if you're a n00b. Don't post if you don't have an answer, unless you need more information to be able to properly answer my question. Thank You.
Hmmmmmmmmm...
moonm325
06-19-2005, 02:57 PM
You need to find a php site with code for a form that creates files. Then use a $POST in your as to call that php script. Kirupa has some php stuff, you should check that out. Then, when the user hits load, they enter their username(if you use that to determine the filename)it does another $POST that requests that file. Not hard.
pj rockastanski
06-20-2005, 05:10 AM
Me and a friend made a auto refresh hitcounter for our school's site, he did it in asp. When the swf loaded it sent a +1 to a text file that had a variable of "hits" stored on his ftp. The swf would then check that file every 3 seconds and load that variable if it was changed, but he took it off because it was constantly pinging his computer. I hope that helps, maybe you could do something similar but have 2 variables, one the username and the second would be their text.
arkhan
06-20-2005, 05:13 PM
yeah..thats how a flash-PHP/ASP chat works..if your server allows you to use java, I recomend, coz it takes out the pinging every once in a while and you can auto-refresh when a msg is sent..
I forgot to tell you bod, but I have done the flash asp chat like I said, but its kinda lame, and its at work comp..yeah..I had some spare time last week..
basicly, a database, each row have 3 cells..name, msg and number..name and msg is pretty simple, flash sends it to a asp that records it in the database.. the other one is just an int number that is unique..called "key"..
when flash opens it sends a msg
**name** entered
and it loads 3 msgs before that one, if theres any..
every time you send a msg, it checks if any msg was sent before and loads them before yours is sent..
every 6 secs it checks for any new msgs sent..
and theres the really fun part..in 5 minutes 3 people talking we had a database with over 20mb..and I didnt bother making some sort of auto-deleting yet..
vBulletin® v3.7.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.