ActionScript 1/2 :: How To Send Data As PHP Variable
Oct 28, 2011I am creating avatar for website. After selecting avatar it store to the database and how can send it as php variable.
View 4 RepliesI am creating avatar for website. After selecting avatar it store to the database and how can send it as php variable.
View 4 RepliesFor 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 ("
[Code]....
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.
[Code]...
I searched around and found some helpful things, but I am still missing something I think...
LoadVariables() won't work across domains, right, so, is it porrible to send data to a CGI script via getURL and not have a popup window on send?
I would like my flash to act differently depending on what html page it is on. Can I send information from html code to action script?
View 1 Repliesi have a problem regarding the integration between flash and ASP file i have an ASP file that gets a record set from the database i don't know how to send this record set to flash and place it in a data grid
View 4 RepliesI need to send a byte array of data (its an image source) along with a bunch of other vars to a service.If I send the byte array using something like the following
var request:URLRequest = new URLRequest ( 'http://www.mydomain.com/upload.php' );
var loader: URLLoader = new URLLoader();
request.contentType = 'application/octet-stream';
[code].....
I have a site with an SWF that I can put some metrics into, such as ZIP Code, Weight, etc.. then, it takes that info and gives me shipping rates.
I need to build a front-end site that I can have a forms page that will push data to the backend SWF, and then return the data back from the SWF to the front end.
Front-end -> SWF (Zip Code, Weight, Size) -> *Calculates* -> Front-End
That should be the flow.. So I need to send data to the backend, GET the data that it calculated, and return the results to my front-end.
I currently have a Flash app that gets populated by parsing data from an external XML file. However, I need to get the XML data into a (JSP) session and can't neccesarily have an external XML file--any suggestions? Can I put the XML string into a hidden input field in a form on the HTML? Can Flash communicate with that HTML? Or are one of the below methods recommended:
* FlashVars
* Flash Remoting
* Web services
* JavaScript - call JS function
* fscommand
* ExternalInterface
Using localconnection i can send data from one swf to another.
[Swf 1] Send data to [SWF 2] - This works with LocalConnection
[SWF 2] Sends this data to [PHP script]
Is there a way to send data from SWF 2 to PHP script without post data? or what would be the secure way to do it?
I would like flash to send and receive data from mysql.
To send data I would like to create 5 input fields, and then use a submit button.
Then to retrieve the data I would like to use the data grid or a dynamic text field.
I am the fan of kirupa but this is my first thread in forum. I have some problem with sendAndLoad method with actionscript 2.0. I am developing a online game with flash mx , MS SQL 2000 and asp. The problem is I send the data using sendAndLoad method to asp file and get data back from asp file. But when the internet connection is not good there is a problem like jam or lost packets. How can I prevent the lost of packets. Some of the data are important. Is there any way to solve this?
View 1 RepliesI brought a pre-built shopping cart and I'm trying to put some buttons in another MC but when I click them the cart don't update.
The original setup of the cart was:
The 'Add to cart' buttons are on the root and the cart was inside an MC also on the root.
Now I understand that it's not not working due to me moving the buttons into a MC.[code]...
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);
[code]....
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.
View 10 Repliesusing Flash CS5, writing in Actionscript 2:This script works:
Actionscript Code:
get_ecard.onRelease = function(){ my_vars = new LoadVars(); my_vars.firstname = name_txt.text; if (my_vars.firstname != "")
[code].....
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.
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.
View 2 RepliesI 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.
<object width="540" height="240" title="sample">
<param name="movie" value="card.swf" />
<param name="flashvars" value="var1=here&var2=are&var3=my&var4=flashvars" />
<embed src="card.swf" flashvars="var1=here&var2=are&var3=my&var4=flashvars" type="application/x-shockwave-flash" width="540" height="240" ></embed>
I am not sure what it is really doing, and what I should change the value to in order for my name variable to be passed.
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.
View 3 RepliesI'm trying to send one variable from flash to php and the see it again in flash but still can't get it work
here is my FLA
and the php code is exactly like this:
[Code]....
I have a search field in flash, it has a text box with a variable name. When the user clicks the search button, I need to send whatever is in that text field to something called 'search.cfm' . I am unfamiliar with any sort of backend coding, but I am hoping this is a fairly basic thing to do.
View 1 RepliesAnd 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 have the following classes:Parent (Document class for parent.swf)Child (Document class for child.swf)Parent successfully loads child.swf as a MovieClip.I am unable to communicate with the child from the parent. I want to send variables to the child.
View 4 RepliesI want to send a variable to javascript, then in the javascript for it to take that flash variable and then evalute it using an if statement. Can I use the loadvars command?
[Code].....
is there a way to send a php variable to flash?I have found on the web some examples using GET... Is using GET the only way?
View 2 Repliesi am trying to send a variable from my swf to a PHP and echo it.
[Code]....
how i can send value to variable from variable arguments???
PHP Code:
var num:Number=0
function ff (e:Number):void {
e=55
}
ff(num)
trace(tt)//0
Is there some way so send data from air application to php file on the server?
View 1 RepliesSo, I have learned how to actually send data from Flash, but how do I in ActionScript send data every 3 second?
View 1 Replies