User Control Panel
Advertisements

HELP US, HELP YOU!

Perl with Actionscript

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl
View unanswered posts
Author Message
Xaxle
Newbie
Newbie


Joined: 24 Apr 2004
Posts: 4

Reputation: 24.9Reputation: 24.9

PostPosted: Wed Jan 12, 2005 5:22 pm    Post subject: Reply with quote

Do any of you guys know about running Perl programs as a database alongside a Flash program with actionscript? Or do you all just do bots...
Back to top
Art
God Like
God Like


Joined: 25 May 2004
Posts: 551
Location: Amsterdam, Holland
Reputation: 35.2Reputation: 35.2Reputation: 35.2Reputation: 35.2

PostPosted: Wed Jan 12, 2005 5:45 pm    Post subject: Reply with quote

There is a Flash module, maybe it supports actionscript.
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Wed Jan 12, 2005 6:13 pm    Post subject: Reply with quote

A search for "flash"
A search for "actionscript"

_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
mattaustin
Sentinel
Sentinel


Joined: 19 Jul 2004
Posts: 556
Location: Los Angeles, CA
Reputation: 50.7
votes: 1

PostPosted: Wed Jan 12, 2005 6:33 pm    Post subject: Reply with quote

i just make my actionscript call the perl script with sendAndLoad...i can post a query to the perl script with the DB stuff

Code:
<br /><br />function login() {<br />   toSend = new LoadVars();<br />   toReceive = new LoadVars();<br />   <br />   toSend.user = "matt";<br />   toSend.pass = "pass";   <br />   <br />   toSend.sendAndLoad("http://127.0.0.1/login.pl", toReceive, "POST");<br />   toReceive.onLoad = function(){status = this["status"];}<br />}<br /><br />


thern in my perl i just print the vars i want to set:

Code:
<br />if($ok){<br />print "status=login ok"<br />}<br />else{<br />print "status=error"<br />}<br />

_________________
[ matt ]
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Wed Jan 12, 2005 7:38 pm    Post subject: Reply with quote

QUOTE(mattaustin @ Jan 12 2005, 01:33 PM)
i just make my actionscript call the perl script with sendAndLoad...i can post a query to the perl script with the DB stuff

Code:
<br /><br />function login() {<br />   toSend = new LoadVars();<br />   toReceive = new LoadVars();<br />   <br />   toSend.user = "matt";<br />   toSend.pass = "pass";   <br />   <br />   toSend.sendAndLoad("http://127.0.0.1/login.pl", toReceive, "POST");<br />   toReceive.onLoad = function(){status = this["status"];}<br />}<br /><br />


thern in my perl i just print the vars i want to set:

Code:
<br />if($ok){<br />print "status=login ok"<br />}<br />else{<br />print "status=error"<br />}<br />

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/
Back to top
mattaustin
Sentinel
Sentinel


Joined: 19 Jul 2004
Posts: 556
Location: Los Angeles, CA
Reputation: 50.7
votes: 1

PostPosted: Wed Jan 12, 2005 8:05 pm    Post subject: Reply with quote

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 ]
Back to top
Xaxle
Newbie
Newbie


Joined: 24 Apr 2004
Posts: 4

Reputation: 24.9Reputation: 24.9

PostPosted: Tue Feb 22, 2005 10:55 pm    Post subject: Reply with quote

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!
Back to top
shmookey
Newbie
Newbie


Joined: 21 Dec 2004
Posts: 49
Location: Western Australia
Reputation: 17.7Reputation: 17.7

PostPosted: Mon Mar 07, 2005 5:54 am    Post subject: Reply with quote

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/
Back to top
M4RTIN
Member
Member


Joined: 31 Dec 2004
Posts: 134

Reputation: 19.2Reputation: 19.2

PostPosted: Mon Mar 07, 2005 1:20 pm    Post subject: Reply with quote

That could be a new type of template, " Flash Bot "

I reckon people would like that Smile
Back to top
alienz
Almost An Agent
Almost An Agent


Joined: 22 Mar 2004
Posts: 1436
Location: Mars
Reputation: 55.7

PostPosted: Mon Mar 07, 2005 4:15 pm    Post subject: Reply with quote

QUOTE(M4RTIN @ Mar 7 2005, 08:20 AM)
That could be a new type  of template, " Flash Bot "

I reckon people would like that Smile
[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
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Mon Mar 07, 2005 5:02 pm    Post subject: Reply with quote

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. ]
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Mon Mar 07, 2005 7:51 pm    Post subject: Reply with quote

QUOTE(M4RTIN @ Mar 7 2005, 08:20 AM)
That could be a new type  of template, " Flash Bot "

I reckon people would like that Smile
[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 Razz ).

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. Razz

Anyways, long story short, it's been done before and isn't really that hard to do.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group