Oh, that's nifty. I would've probably did something like...
Code:
// For a button or something<br />on (release) {<br /> loadVariablesNum ("/cgi-bin/flash.cgi?name=" + name + "&msg=" + msg);<br />}<br />
And then flash.cgi would print out variables for Flash to use.
The problem with that is that apparently Flash's ability to load variables is really sensitive to the user's security settings, so for it to work they'd have to lower all their security and stuff.
But then again, I don't do much programming with Flash, so I never really looked into it. _________________ Current Site (2008) http://www.cuvou.com/
Joined: 19 Jul 2004 Posts: 556 Location: Los Angeles, CA votes: 1
Posted: Wed Jan 12, 2005 8:05 pm Post subject:
you dont need to lower your security just make sure yout script your calling and your flash are on the same server. Second i make the vars so i can do a post instead of a get.. _________________ [ matt ]
Thanks, reason I was asking is that I'm going to eventually make a MMORPG with a Perl database running alongside the flash game to allow other people to be visible onscreen etc. I just need to get the engine running first. Thanks guys!
Joined: 21 Dec 2004 Posts: 49 Location: Western Australia
Posted: Mon Mar 07, 2005 5:54 am Post subject:
QUOTE(Xaxle @ Feb 22 2005, 02:55 PM)
Thanks, reason I was asking is that I'm going to eventually make a MMORPG with a Perl database running alongside the flash game to allow other people to be visible onscreen etc. I just need to get the engine running first. Thanks guys! [right][snapback]45924[/snapback][/right]
Well, for that purpose, using sendAndLoad is probably a bad idea, because it is really quite slow (for each update of information a new HTTP connection has to be created, and a whole lot of extra information has to be exchanged. The way to do it in your case would be to write the actionscript to open a socket and make a single, perpetual connection to the server script, which you can write in perl. I think flash calls them XMLSocket's, and they are really quite convienient becuase they are designed for exchanging XML, which is a very useful way of transmitting variables. Here's an example that uses a perl backend: http://www.heliant.net/~stsai/code/
That could be a new type of template, " Flash Bot "
I reckon people would like that [right][snapback]46497[/snapback][/right]
Flash based bots have been done before. _________________ Check out Botworld! A dev resource for things bot.
Downloads, articles, news, fourm and more.
http://botworld.marzopolis.com
Xaxle (who I know IRL) has read this and says thanks. He lost his password, otherwise he would reply. _________________ ~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
That could be a new type of template, " Flash Bot "
I reckon people would like that [right][snapback]46497[/snapback][/right]
In early Juggernaut bots, there was a Flash template on its webserver (I later removed it because it uses "loadVariablesNum" when that "sendAndReceive" is probably better... so the conversations were kind of slow, and Internet security settings caused like half of the Flash users to be unable to chat through the Flash client ).
But how that worked was:
Code:
on (release, keyPress "<Enter>") {<br /> loadVariablesNum ("/flash.chat?name=" + nick + "&msg=" + msg, 0);<br /> msg = '';<br />}
When "flash.chat" was accessed on the server, it would print out something like this:
Code:
&reply=Hello there!
And "reply" was the name of a dynamic text object.
Anyways, long story short, it's been done before and isn't really that hard to do. _________________ Current Site (2008) http://www.cuvou.com/