ActionScript 3.0 :: Sending Variables To A Database?
Jun 5, 2011
how to send data via ActionScript 3.0, I just wanted to make sure that my code is on the up-and-up. I'm having some problems getting my data to send, and I'm wondering if it's on me, or on my client's backend.
Code:
function add_score():void {
var myRequest:URLRequest = new URLRequest(baseVar + "main add_record");
[code]....
View 1 Replies
Similar Posts:
Mar 28, 2009
how to send data from a flash to a database and how the receive it aswell. Im presuming you pass the data from the flash to a php file to the database when sending and call the data using a php file to the database aswell. What im trying to do is just have a button that will increment a number in a database by 1 and then display that information on a different Frame within the flash later.
Basically what i want to do if have a button pressed to increment a number in a database.
View 6 Replies
Dec 21, 2009
I am looking for some advice on creating a flash sound game. The visuals are all done as is the animation. I am trying to create a piano, that you can play a tune, somehow (when pressing down a button) 'record' the sound and once you have finished, send the link to the sound you have created to a friend, where it can be played back when they visit the website and see what you did.
View 1 Replies
Sep 16, 2011
How it can be done - when I press a button, then some value will be kept in some variableAnd how the values can be sent to the MySQL database ?
View 5 Replies
Feb 22, 2011
I have a Mysql database and I am trying to import multiple records with multiple columns into Flash AS3 using PHP. My problem is I am able to make it work with a single column and multiple records but for multiple columns I am not being able to format it correctly. What i wish to have is an array(of records) of associative arrays(of columns) i.e. I want to be able to partition the output (from php) based on '|' and store it in a flash array and then be able to access name,id for each of them (see below the code).[code]the problem is I get an array of names,id but the myArray ForFlash is empty (which is kind of expected).
View 1 Replies
Nov 5, 2011
I have a problem with a flashpage I am developing. It sends a request to a database through a php-file and retrieve a text that I place in a textfield. The problem is that the swedish and other specialcharacters is shown in code format looking like this u00e4 . I know both my php-file and database is correct because I have used the same request with the same php-file and database in a android app and it works perfect.
PHP Code:
<?php
header("Content-type: text/html; charset=utf-8");
$con = mysql_connect("localhost","db","psw");
if(!$con) {
[Code] .....
View 8 Replies
May 23, 2005
I am using a form I made in flash to send variables to a MySql Database.
Code for form:
trace(email1.text+", "+question1.text+", "+check1.selected);
status1.text
send1.onPress = function () {
status1.text = "sending..";
var ld:LoadVars = new LoadVars ();
[Code] .....
View 9 Replies
Aug 19, 2009
I am making a site that is in Hebrew and English. It contains two .swf files. The 1st .swf file allows the user to choose whether he wants the site in Hebrew or English. When he goes to the 2nd .swf file via a link I would like the 2nd .swf file to already know what language the user chose. How would I do this? using getURL and variables?
View 2 Replies
Sep 11, 2010
so making a high score board i can use in my games. the tutorial i found (every tutorial i found, in fact) was AS2, so i've taking the principles in the tutorial and converting them to AS3. I'm pretty darn close to having it work. i have it successfully pulling the data in the php/database to the flash file and listing the contents of the high score board, but i seem to be missing something when sending new name and score info to it.
here is my test file: [URL]
you can see the high score list comes up (the info coming in is from when i went through the AS2 tutorial), but as you can see it's not adding the name and score you enter in the first part to the list.
here is code i'm using to send the info:
Code:
var sendScoreVars:URLVariables = new URLVariables();
sendScoreVars.userName = userName;
sendScoreVars.myScore = userScore;
[Code].....
View 1 Replies
Oct 20, 2009
I have been trying for the last two days to get flash to pass variables to ASP with no luck.
[Code]..
View 1 Replies
Jul 7, 2009
i wanted to make the step of sending variables from flash to PHP. I just made a simple PHP script which takes in three variables and uses them to send a mail. So after searching a while i found something that should work, but when i tried it nothing happened, no error nor any email recieved. Here are my scripts:
ActionScript Code:
var myVariables:URLVariables = new URLVariables();
myVariables.to = "name@domain.com";//can be replaced with your own email
myVariables.subject = "Test Mail";[code].....
View 9 Replies
Jan 19, 2008
i have an email box on my site. It has 2 input text boxes, name and email. It also has a few check boxes that i made. Now here is the problem. The two input boxes work just fine, however, i need it to also send a variable to my php file when a box is checked. send a variable to php that is NOT a text field
View 6 Replies
Oct 13, 2008
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.
View 2 Replies
Oct 4, 2002
I load a new swf on level 0 to replace the one already there and I'd like to pass variables (an object) from the unloading movie to the loading one. I can't use cookies or shared objects. I remember reading something somewhere about using javascript to do it but can't find it.
View 2 Replies
Nov 6, 2010
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?
View 2 Replies
Jan 21, 2007
I am working on the contact form for a website that is done entirely in flash. The following is the code I have for sending the variables to the emailForm.php script that I created. The only problem I'm having is that everytime you send the contact information, a new web browser window opens up (it opens the php file in the web browser). I'm testing this on my local server and it works great, except for the fact that everytime I send it, I dont want a new browser window opening up.
View 1 Replies
Jan 18, 2009
How would I send variables to php when I use AMFPHP? I'm trying to send mediaID and voteValue to my php file, but nothing seems to happen. I guess there's something wrong here..
View 5 Replies
Oct 2, 2011
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]............
View 1 Replies
Jul 20, 2009
I'm looking to figure out a simple way to send variables to a flash page.
Basically [URL]
Not sure exactly how it works in flash and out of flash. I searched but couldnt really find anything that worked..
Edit: I found this post
[URL]
But I'm not really sure where to put it and how to execute it. Do I just put the variables in the URL and then put that AS into my code?
View 4 Replies
Sep 9, 2009
i want to send unicode variables to a php asscript that fetch rows from mysql database and make xml.everything is ok but the query send as question marks.URL...i used System.useCodePage=true; but problem is there! i changed the method from GET to POST and...
View 1 Replies
Nov 30, 2011
this is my php code
[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
View 3 Replies
Jun 7, 2005
I sorta asked about this in the Server-side section, but I guess the question is really more AS related....How can I send variables from a swf to a cfm page that the swf is embedded in WITHOUT having to reload the page.
I tried the LoadVars() Object, it send() variables fine but the page reloads, and it loops so I get a million windows opening...what do I do? I need to be able to communicate back and forth with the cfm files...
View 1 Replies
Oct 11, 2005
I've got a bunch of movieclips which are thumbnails. When you click them, they open a popup with that picture up big and a little description of it.
I've got these two pieces of code:
Sender
Code:
onClipEvent(load){
thisName = this._name
thisPictureNumberArray = thisName.split("Container")
[Code].....
Edit: and if I trace the variables trace(thispictureTitle); it works fine too, so they're being got fine.
View 5 Replies
May 10, 2003
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.
View 14 Replies
Feb 7, 2007
I have a header with tab buttons--- When you are on a certain page the coorisponding tab is a different color(as a locator). Right now I have like, 7 or 8 different headers that are the same thing minus the colored tab of the current page.Is there a way to code the flash so that I only need one header, but still keep the off-colored buttons when on the coorisponding page?Apparently, from what I have gathered I need to Send a variable to the SWF from the embedding HTML using FlashVars or SWFObjects' 'addVariable' method etc so the SWF knows which tab/color to use.But, I have no ideal where to start...u
View 4 Replies
Feb 10, 2009
I have a swf banner that when the user clicks a button, links to another page sending its variables to be read by the new swf page.
I looked into "local connect" but i wasn't sure it would work, because I would like it to link in the same window. and on different domains.
View 13 Replies
Mar 25, 2009
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.
View 2 Replies
Jul 16, 2009
Im building a reservation form, using actionscript and php. I use sendAndLoad to send variables to php via POST, which returns a different HTTP POST response in case of success or not. Is there anyway to "read" HTTP POST responses with actionscript?
View 1 Replies
Sep 3, 2009
I am trying to send variables to php script via POST with AS2. This is the code I use:
Code:
on(press){
var sendvars:LoadVars = new LoadVars();
sendvars.at = 'abv';
sendvars.wpc = 'abv';
sendvars.AlbumName = an.text;
sendvars.send('[URL]', "_blank", "POST");
}
The variables are sent, but POST is converted to GET and flash open this [URL].
View 2 Replies
Sep 19, 2003
can i send some variables that are within a text file into the actionscript; i mean, in 1.txt there will be a[1]=30; can i use a function to read this variable and then use it in the actionscript like x=a[1]+2 and x would be 32?
View 1 Replies