Theres a great tutorial for sending and loading XML here: http:[url]...However, its written in AS2 and Id like to have an equivalent in AS3. Ive attached my attempt, but it doesnt work? even though it doesnt throw any errors.
I have a question about this sendAndLoad() function. Can I send XML (generated in flash) and LoadVars() (or string) together in single turn. Something like this: myXml.sendAndLoad("somePHP.php",myXml,myLoadVars ...) It doesn't have to be LoadVars, it can be simply string. My problem is that I need to generate xml and name it from flash. Right now, the program is working with separate sendAndLoad. I have a two PHPs one is generating txt file and saves name to it, and other is opening that file, reads name from it, creates xml with that name, and saves xml from flash.
How can I use sendAndLoad to call a php page with flash, and have that page create a user download box, to save a txt file? I have the php code that outputs a text file:
Code: Header('Content-Type: application/octet-stream'); Header('Content-Disposition: attachment; filename=test.txt'); // Print the text to be sent echo "hi";
That would force a download box if you ran the php page but the send and load will not get it to work.
I have a high score submit script, and it goes as follows...This is the actionscript:
Code: on (release) { var uscore:LoadVars = new LoadVars();[code]......
We have tried many things, and we finally decided to just check for success to see if the vars were passed through. The first time we tried it, it worked, and then since then no matter how many times we try it won't work. I have also tried to just run random scripts when the page is loaded, regardless of what vars were sent, and nothing ever happens, so I'm under the notion that the sendAndLoad() isn't well.. Loading the page. It was working before, but it appears to have just stopped, we're not sure what we changed.
I want to modify an existing xml file (membres.xml) starting from flash by using sendAndLoad() and while passing by a php file. I control rather well flash, I know xml better and better but I know the php still little. My progamming is partly inspired from this tutorial: [URL]. But something still does not function. This is why I need your assistance. All seems to function, but my xml file (membres.xml) remains unchanged.
Flash: In flash, after having loaded and having modified the file membres.xml, I use sendAndLoad to send my xml object to the php file: reload_xml.sendAndLoad("envoiexml.php", membres_xml);
A trace of the xml object did right before sendAndLoad shows that the xml object reload_xml was modified correctly. The error must thus logically be further. Here now the php code in the file envoiexml.php:
I'm basically sending some variables to a php script from flash and then returning some values back to flash from the script. The problem is that the values returned to flash are appearing correctly but do not test correct. My actionscript and php scripts are below (just samples displaying the the mechanics of what i'm trying to do):
I have inherited a custom application on Flash Media Interactive Server 3.0 that broadcasts audio in real time. The custom app is written using Adobe Flash Professional 8 and actionscript 2.0.
A little background of how the custom app works When a user connects to the media server to join a stream, our custom application calls out to a seperate application server (that is not Flash) to determine if the user is allowed to connect to a broadcast stream and which stream they should join. We use Xml.sendAndLoad() to do this. The application server we call sends back Xml to the custom App on the Flash Media Server.
I have a little flash application(cs4) to read xml files and to display the contents. xml files are being read using LoadVars::sendAndLoad() over http. It works fine unless I have an accented characater in the url.
I was googling all the evening trying to find a safe way to send data to MySQL db.
The method that I was using in past projects is like this (AS2 > PHP > MySQL):
[Code]...
This method is unsafe since it sends data to PHP with a GET method, the URL string insertDB.php?Name=Jonh&Age=18&Country=USA&Points=123 So anyone can just type in the address bar [URL]..and insert this record (for example with 999 points) into database.
I am having an issue getting sendandload to work with IE. It is working great with Firefox. I am not using https for anything, so I dont think it would have anything to do with what I have been reading.
I have a flash form with input text fields. I am sending the data to a 3rd party server. I can send the information via getURL but I want to send the data without opening a browser window so I am utilizing sendAndLoad. It works great locally but not through a browser (tested in IE and Firefox). I have verified that all the variables and urls are in the correct case, I have tried both Post and Get, I have tried network and local
Just wondering if you can use the sendAndLoad method of the Loadvars object to send "POST" data to a server then recieve the response in an XML object.
I'm attaching an MC to the timeline and within that attached MC is a LoadVars.sendAndLoad command. This works flawlessly when I have a few variables but becomes horribly bogged down when I have to send (and receive) lots of data. It actually freezes my swf until all the data is loaded, then switches windows <minimizes itself in Win XP> after it's all done loading.So I figure I need a way for the original attach movie to finish loading, before I send the PHP commands...
I'm using sendAndLoad to send data from a Flash form to a PHP script. The PHP script will search an SQL database and return the results, in XML, to Flash for parsing. The problem is I'm completely stuck on how to extract the sent Flash information with PHP. It's a single tag with attributes.
Actionscript Code: listener.onComplete = function(file:FileReference):Void{filename = file.name;var sender_lv:LoadVars = new LoadVars();sender_lv.filename = filename;var reciever_lv:LoadVars = new LoadVars();reciever_lv.onLoad =
[Code]......
It uploads a text file to my server (I'm running the .swf file locally) and it works. But I need to load the contents of the file into my program, and when I do the special norwegian characters "� � �" turns into jibberish. So I wrote a script to change the encoding, but when I send the filename to the .php file, I don't get a response.
I am using the sendAndLoad class to perform a script through PHP and load the variables back into the swf. Using Firefox Firebug, I am able to tell that everything is executing correctly, including the PHP script returning the following variables:
&mySubscriberID=36&firstName=Bill
But the variables are not making it back into the swf file. Here is the code for the first frame of my flash file:
[Code]....
I also have dynamic text fields with the above variables assigned to them.
the sendAndLoad class to perform a script through PHP and load the variables back into the swf. Using Firefox Firebug, I am able to tell that everything is executing correctly,including the PHP script returning the followingvariables:&mySubscriberID=36&firstName=BillBut the variables are not making it back into the swf file. Here is the code for the first frame of my flash file:
stop(); var sendLV = new LoadVars();var recLV = new LoadVars(); recLV.onLoad = function(success:Boolean){trace("recLV back from php");} sendLV.onLoad = function(success:Boolean){ nextFrame(); trace("sendLV back
In the code below - fRequest_activate initiates a sendAndLoad - all fine and dandy. Thing is - I want to be able to return a value from this function that indicates whether the server response was satisfactory - and I can't work out how to to it.Because the onLoad function is nested within my fRequest_activate function it has all got a bit messy - and just doesn't work - how do I pass the status from an asynchronous server call - which at the moment is picked up by the onLoad callback, back to my original function? - or should I just approach this problem in a different way? All I want to do is call one function - and know if it has been successful or not in talking to my server.
Code: function fRequest_activate():String { var lvEmail_send:LoadVars = new LoadVars(); var lvEmail_response:LoadVars = new LoadVars();[code]...............
I am using sendAndLoad to query a database that returns over 30,000 records. While the query itself is executed in 0.43 seconds (says phpmyadmin) the sendAndLoad takes some 15 seconds to be executed in AS2. I am wondering if there is a faster alternative to this method.
I try make work a simple sendAndLoad but I got a strange answer from server!
AS3-PHP.fla :
ActionScript Code: var var_put:URLVariables=new URLVariables(); var_put.name1="John";[code].........
First var1 is undefined, second it's strange to see a part of the html page.I read other examples which looks like to mine, I don't know what write more to make it works.
I'd like to double check that sendAndLoad is sending the correct string to a jsp. I don't have any control over the jsp so I'm reliant on seeing the url string. Here's the code use to sendAndLoad
ActionScript Code: function doSubmit() { formData = new LoadVars(); formData.loginName = "test";
I'm creating a login in Flash that connects to a MySql database through PHP.I'm using sendAndLoad() and the variables are being send to PHP without any prolems, however it does not seem to be returning any info resulting in a "invalid username/pass" message.I'm fairly sure the problem lies in the PHP but not too sure where! Do I have to declare the result_lv variable in the PHP somewhere? How and where?
I have one questio: How can i sendAndLoad variables that are on another domain.I have a mail form in flash...and i'm using sendAndLoad property, here it's my script:
I have a problem with the code below. It sends the vars to the submit.php but it doesnt load them. All files are in the same folder. Get the .fla --> here
Code: var oListener:Object = new Object(); this.onEnterFrame = function() { ratio.text = score; lvData.scored = score;
I have an issue trying to send out a url with value name pairs in different languages. Does anyone know if there is a function in flash to convert the characters to html entities before hand?