Basically I am trying to send a variable from flash to php, I was trying to do it through the sendToURL function, because this seemed to be the most appropriate way to do this, although I may be wrong. Below is the AS.
var quizVariables:URLVariables = new URLVariables(); quizVariables.party = "labour"; var myURLRequest:URLRequest = new URLRequest(".../partyhandler.php"); myURLRequest.data = quizVariables; sendToURL(myURLRequest);
Once this is done it should cause the following PHP to run (which works fine if I manually type in the address eg .../partyhandler.php?party=labour)
$party = $_GET['party']; mysql_query("UPDATE party SET $party = $party+1 WHERE id=1");echo $party;
however something seems to not be working with the flash element of the code.
And i m struggling for this past 5 days without knowing the solution AS3 script i wanna send a dynamic variable from flash to php... this work gr8 flash file
[Code]....
in this php file i want to change "$i" dynamically. which the data from from flash should update. i dnt know how to do. when i give 2 then database should fetch fp_id =2, if i give 1 ishoud get fp_id 1.
I've been trying to communicate flash and javascript some time now, but I can't get Javascript to send variables to flash, just the other way around. When the .swf is done loading, it succesfully triggers the "isReady" function in Javascript, but when i try to trigger the "sendToFlash" function in Flash(via javascript), nothing happens.
"thisMovie("myID").sendToFlash(toFlash);" this is the code I can't get to work, as you see I tried these to as well; document.getElementById("myID").sendToFlash(toFlas h); document["myID"].sendToFlash(toFlash);
i wanna send a dynamic variable from flash to php.[code]in this php file i want to change "$i" dynamically... which the data from from flash should update.when i give 2 then database should fetch fp_id =2, if i give 1 ishoud get fp_id 1.
Also, just a little variable. (xmlfile=text.xml) (I want to have the same swf-file but use it in several html-files (and I have one xml-file to every html-file))
I'd like to be able to generate certain data XML file through PHP based on variable that embedded in html page swf sends or request. I heard that it can be achieved by assigning FlashVars. I created a flash gallery which loads all content based on data from XML. However, I need to load a different content using the same flash gallery based in which html page the swf(gallery) is embedded. I can generate new XML through PHP if swf will send a variable to PHP which can be read as unique. I need to create a mechanism where the embedded swf send this unique variable.
I wrote a little test program to learn about mySQL integration in Flash. The program looks as: I have one button and one dynamic text field. If I hit the button, as3 starts an URLRequest to a php file which then connects to a mySQL database. The requested variable is send to as3 and displayed in the text field. Up to this point, everything is working fine. But when I hit the button again, after I updated my db, the text field still shows the old value. Although it should output the current value.
So, here's my as3 code: mButton.addEventListener(MouseEvent.CLICK, onSQL); function onSQL(e:MouseEvent):void { var varSend:URLRequest = new URLRequest("[URL]"); varSend.method = URLRequestMethod.POST; var varLoader:URLLoader = new URLLoader; [Code] .....
I really don't know, why the program is not updating the value.
[Flash MX 2004] Anyone noe how to send a variable value from flash to a php page? I have a score's value which I need to send it to the php page n update into the database.
I'm creating a simple chat with flash with uses xml to store the messages. But how can I send the variable msg from flash into a xml document?If the xml-file looks like this:
I am struggling with sending some variables to a php page from my flash movie. On the last frame of my flash movie i have a button which navigates the user onto a new php page where i want to display the variables in. The code i currently have is :
AS3 -
Code: // set variables as a string containing the dynamic textfield. var Introduction:String = (introduction_txt.text); //
[Code]....
The echo in the php page comes up as Intro=, I need to echo the variable of $intro which contains the dynamic text in 'introduction_txt.text' in flash.
I am trying to create a email form or a button that will send an email to the users email address that they enter. I want to send them a different email depending on a variable that has been set? For instance I have five backgrounds, and earlier you were asked to choose a background. Once the background was set, so was a variable. Depending on this variable, I would like a different email, with content relative to the chosen background to be sent. How can I go about doing something like this?
For the life of me, I've tried everything: I've researched LoadVars on Adobe forum, used David Powers' books, googled 'flash to php', LoadVars, etc. and tried sendAndLoad, send, and using $_POST, $_GET, $_REQUEST. $HTTP_POSTVARS but I keep getting this same error.
I have a Unix server running Apache/PHP 4 - LoadVars worked to load name-value pairs into an array -see thread)
My goal with this simple app is to prototype being able to pass a variable from flash to a variable in php.
Parse error: syntax error, unexpected T_VARIABLE in flash_to_SQL.php on line 5
Actionscript 2.0 code:
var c :LoadVars = new LoadVars(); c.testing = "123FOUR"; c.send ("
Like the title say's, is it possible to send data to my flash movie after it has been loaded? More specific: I have a flash-movie with an image in it, and from the outside I would like to be able to alter it by sending fe. '?color=FF00FF' to the movie
I would like to send data from PHP to Flash however, it sends just fine but when displaying on Flash, it does not display the contents in the variable. Instead, it displays the name of the variable. This may be a simple answer but I'm quite new to this. Here is the code in Flash.
I'm trying to send a variable from an HTML into Flash in order to modify it based on the value. I generally know how FlashVars works in AS3, so I did some quick reading for AS2 and made a test swf.
[URL]
In my swf, the first frame only has this code:
Code: if (_root.tester == undefined) { var passed:String = "Nothing Passed"; } else { var passed:String = _root.tester; } texty.text = passed;
According to what I've read and what my code is, this should work. It should read the value of video as the value of _root.tester (check the HTML code), yet it's always listed as undefined.
I'm looking to send a list of variables (say 6 in total) from php to flash and for flash to pick a random one and send it back to php when clicking a button.
I would like it to appear in a dynamic text box. That randomly selected variable needs to be sent back to php on pressing a button.
I'm looking to send a list of variables (say 6 in total) from php to flash and for flash to pick a random one and send it back to php when clicking a button. I would like it to appear in a dynamic text box. That randomly selected variable needs to be sent back to php on pressing a button.
I've got a flash course that needs to pass the current screen number from the course to the mySQL database. The person who built the back-end built a php page that I can pass the number to and it will get written to the db but I'm not sure how to "send" that in the background.He told me that I just need to call the index.php page like: [URL]So, would I use URLRequest for something like that?
Code: var vars:URLVariables = new URLVariables(); vars.theData = data; var req:URLRequest = new URLRequest("www.url.com/index.php/user/bookmark/"+slideNum);
I'd like to be able to generate certain data XML file through PHP based on variable that embedded in html page swf sends or request. I heard that it can be achieved by assigning FlashVars. I created a flash gallery which loads all content based on data from XML. However, I need to load a different content using the same flash gallery based in which html page the swf(gallery) is embedded. I can generate new XML through PHP if swf will send a variable to PHP which can be read as unique. I need to create a mechanism where the embedded swf send this unique variable.
i want to make a swf ecard. the swf will include an input text for a message + input text for sender email adress + recipient email adress.the swf will send variable to php with random name + email to recipience with message that inform bout an ecard sent to them + specific url.
I have a html form and when submit is clicked, my php processes the data. At the moment its simple, just one field displayed to the screen <?php echo htmlspecialchars($_POST['name']); ?>.Instead of doing this, I want to send the variable name to a swf file, and load the swf file with the name. I will use flashvars to do this. I have seen examples, and I think this one is used to display the swf onto the webpage, and pass the data to the swf.