puma
1
i’d like to program a film that can communicate with an other client.
so its necessary to write sth to the server. (and after that to read that information by the other clients)
but i dont get that first problem to solve. here my .fla and .php file. why doesnt it work?
source in flash:
on (release) {
_root.mybutton.onRelease = function() {
var c = new LoadVars();
c.datenstring = “test”;
c.send(“writer.php”);
stop();
};
}
thx 4 any help
puma
system
2
Start by changing your script to
on (release) {
var c = new LoadVars();
c.datenstring = "test";
c.send("writer.php");
stop();
}
Because you were assigning a onPress event to the button when you pressed it…
Did you try to simply echo the variable on the PHP side?
pom :asian:
system
3
oh yes, of course!!! i that way it’s working on the 2nd mouse click.
well i’ve edited it. thanks for your answer.
but it doesnt work well. nothing happens with:
c.send(“writer.php”);
but writer.php writes the file with:
c.send(“writer.php”, this);
but i dont want to open a new window, and thats what happens with that ‘this’.
puma
system
4
I honnestly have 0 idea. Sorry.
pom :asian:
system
5
thx 4 your honesty ![:wink: :wink:](https://forum.kirupa.com/uploads/default/original/2X/0/0c2540abbc481a343b73ee8a755882b49ebbd54f.gif?v=5)
well, i’ve found an alternative with loadVariables.
writing works fine, but not reading… thats strange. could you have a look?
puma
system
6
Having the same kind of problems but I’m trying to use Perl.This may help you for your php stuff.
http://actionscript-toolbox.com/samplemx_loadvars.php
Hope it helps.![:slight_smile: :slight_smile:](https://forum.kirupa.com/images/emoji/twitter/slight_smile.png?v=5)