ActionScript 3.0 :: Sending The Variables Message And Userid - Flash - PHP
Jul 23, 2009
I am trying to learn ActionScript 3 and now I am trying to learn about sending actionscript data - PHP. Now to the problem: No data are sent when I use this code. I am sending the variables message and userid, that you can se in the code...
In our application we have an embedded Flash control (in a HTML file in our Browser control) that shows some games. I looking for some way to call / notify this Flash control from C++ or JavaScript when some events are happening outside of it in order to display something / set it's internal values.
how (if possible) this could be acheived? I think there is an option to call JavaScript from C++ and then JavaScript call Flash, but that's looks a bit tricky to me. is there is a way to "call" the Flash control "directly" or send a message to it.
The form is not sending a message to my email. I am not sure whether the problem is in the AS 3.0 code or the PHP code, anyway here's the code: Actionscript 3.0 code: function handCursor(e:MouseEvent):void { e.target.buttonMode=true; e.target.useHandCursor=true; } build variable name for the URL Variables loader var variables:URLVariables = new URLVariables; [Code] .....
I have a problem with Map objects, while using Gravity. All messages works ok, except the ones which includes Map objects. They throw the following exception:ArgumentError: Error #2173: Could not read the object in the stream. though lass:org.granite.collections.BasicMap do not implement flash.utils.IExternalizable,but we know that it's Class:externalizable by its alias.I've found that this error occurs when you do not include granite-essentials.swc, but I don't think that's the case, because normal messaging using RemoteObject works fine, even with Map objects
I am currently working on an online connect four game where the state of the game needs to be updated after ever move. i've had no problems sending variables from a php script to flash but i'm having difficultly sending variables from flash to php when trying to update a database. i am getting this error message:
The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
To try an understand the process and figure out what i am doing wrong i've stripped down both my actionscript and php files to the bare minimum but still it wont seem to work. here is my actionscript:
Code: var game_id:String = "1"; var postURL:String = "updateMoveScript.php"; var variables:URLVariables = new URLVariables();
[Code]....
i know the php query is fine as i've tested it by changing the $game_id variable to the value i want to send.
i've tried changing urldataformat from variables to text and also messed about with changing post and get and about every different possible combinations of doing this but with no joy.
I want to send variables from my Flash (AS2) movie to a PHP file that would then process the variables and echo them, but echo in an HTML page. Basically, I want to make my Flash movie form the equivalent of an HTML form, in that, when it's submitted, it sends the variables by POST and opens the PHP page for the PHP page to process and deal with, instead of sending the variables and loading the response from PHP into Flash.
I've been unable to use loadVariables in the usual way that I do it. Actionscript Code: form.loadVariables("myPHPfile.php", "POST);
Because that sends the variables to the PHP file, but then does not open the PHP file in the browser. Is there anyway that I can make this work? How can I make the variables send from Flash and then open the PHP page in a new browser window, just like an HTML form would?
So this is probably a simple question, but for some reason, I'm having problems with it. I have no ideia why, but I suspect the fact that sending a xml with full "< something >" tags may cause the php to behave wrongly.So all I need is to send (from a swf as3 client) a filename and a xml. The php will write a xml file with the required filename.
Everything should be okay with the php side, because I tried it using " $_GET " variables, but whenever I try using the flash client, It just doesent work, and the php log says that "the filename variable can't be empty". Whenever I try some static filename (not using GET or POST), it works.
EDIT: Code added.
var xmlURLReq:URLRequest = new URLRequest("www.url.com"); var test:URLVariables = new URLVariables; test.filename = "01.xml";[code]............
as you can see i want to send variable"t$i" from php to flash but my this code is not working for me.its like i am sending a variable from php to flash which name is a variable. i dont want to use a.text=myData.t0 simply
I'll try to explain this as best as I can.I have about 30 .jpg files, 1 .swf file and 1 .php file.I want the PHP to load multiple copies of the SWF and have each copy load a diffrent JPG.
I want to send some variables to flash, just changing some the URL of the page. Tried adding ?value=2 on the url and receive that on flash, but it�s not working.
Accepted a connection from IP:42.159.56.116, referrer: http://hh.dyndns.org/swfs/StrobeMediaPlayback.swf", pageurl: "http:/hh.dyndns.org/live.htm?source=rtmp://hh.dyndns.org/live/livest ream&type=liveSending error message: Method not found (FCSubscribe).
For a company I made a website in flash. Everything seems to work fine except the mailform. Infact the mailform does his job but the message's I receive look like this: First name: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="13" COLOR="#000000" LETTERSPACING="0" KERNING="0">Nick</FONT></P></TEXTFORMAT> Email: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="13" COLOR="#000000" .....
I am trying to send variables from my Flash App to an ASPX page which receives the variables and outputs them on the screen. But he aspx script is not able to receive the variables. I am putting the variable into an object and sending that object using POST method through the URLVaiable class.
I am having trouble with what would seem to be a simple thing...I need to pass a variable generated by the user from a swf/html page to another swf/html page. I am encoding the variable in the URL....?bagVar=How do I get whatever the content of this variable is imported to the other swf/html page? None of the documentation I've found seems to answer this (maybe I am looking in the wrong places).
I've been having issues sending a list of ids to a php script from my swf file. What's interesting is when I test it locally it connects to bodysave.php and updates the output script with the current ids. However, when I upload the file, and run the swf file from the server - it updates the output file with 0's. Since the output script is getting those 0's, I know all of the paths are correct. But I can't figure out why the correct ids aren't being set.
I am trying to get an xml to load from an external site using a PHP proxy. I have been able to achieve this with the url of the xml hard coded in the PHP though I now wish to get the flash to send the url as a variable to the PHP though I am unsure how to do this.
I've been having issues sending a list of ids to a php script from my swf file. What's interesting is when I test it locally it connects to bodysave.php and updates the output script with the current ids. However, when I upload the file, and run the swf file from the server - it updates the output file with 0's. Since the output script is getting those 0's, I know all of the paths are correct. But I can't figure out why the ids aren't being setHere's my code to save the ids of the current elements on the stage and then send those as variables to a php script:
Code: Select all//Save Button save_button.addEventListener(MouseEvent.MOUSE_DOWN, saveButton); function saveButton(event:Event) {
How can I make Flash accept a numerical variable from a webpage and send the variable back to a webpage? Something like a counter, which counts the number of times the Flash is loaded.I want Flash to read a numerical value maybe from a txt file(any other ways?), add 1 to it, and send it back to a PHP script.
Why does everything in Flash have to be such a pain in the ***? You think you're going to do something simple in 5 seconds of typing, but half of the times it turns out you're wasting hours searching for a way around some stupid restriction of flash.This time I made a movie that uses some variables that are specified in the .html (FlashVars). Sending these variables from html to the flash movie is no problem. But I tried to see if my movie still works when it's loaded into a holder movieclip. So I use the following code to load the movie and send the same variables to it:
How can I make Flash accept a numerical variable from a webpage and send the variable back to a webpage? Something like a counter, which counts the number of times the Flash is loaded.
I want Flash to read a numerical value maybe from a txt file(any other ways?), add 1 to it, and send it back to a PHP script.
At the moment, I am posting information from my flash to a PHP page within the same server. This causes no problems, as I am posting to a PHP file within the same directory. form.loadVariables("email.php", "POST"); However, I am wanting to place my 'WIDGET' on other sites but still post the information back to my server to the PHP file (email.php).
So I am successfully able to send variabls from Flash to PHP, but I am still unable to figure out how to send the USER to the php page along with their variables. The reason I want to do this is because the PHP script in question spits out a bunch of text to the user based off the variables sent to it from flash.
Right now, when the user clicks the submit button in flash it sends the variables to flash ok, but to the user, they just continue to sit idly on the flash page, even though it no longer serves a purpose.
how can I get flash to send the user AND their data to the php script when they click the submit button?
Here's what I'm using now (inside flash):
//variables used to send data to server for processing var scriptRequest2:URLRequest = new URLRequest("qm-results.php"); var scriptLoader2:URLLoader = new URLLoader(); var scriptVars2:URLVariables = new URLVariables();
I'm having trouble with this previous posted tutorial. I followed the instructions step by step but it just didn't work for me.In the PHP Script I replaced this line:
$Email = $_POST['email']; With this line: $Email = "my@email.com";
So I know the problem isn't there. I have recorded 1min.11sec screen shot video of exactly what I did.Click her for the screenshot Part 2: Sending variables from a Flash Movie to a PHP script, and then using that PHP script to send an e-mail.
I got this error when i am trying to connect on rtmp://172.31.14.91/live/livestream. Accepted a connection from IP:172.31.14.91, referrer: , pageurl: Sending error message: Method not found (getStreamLength). I don't have any problems with vod but on live streaming is so hard for me to get it.My encoder is a Media live encoder 3 and the media server is media server 3.5.