Actionscript 3.0 :: Insert Data To Database?
Sep 28, 2008var variable:URLVariables = new URLVariables();
var myRequest:URLRequest = new URLRequest();
myRequest.data = variable;
[code]....
var variable:URLVariables = new URLVariables();
var myRequest:URLRequest = new URLRequest();
myRequest.data = variable;
[code]....
First of all I am using Flash MX 2004 and have Office 2003.
I am trying to use my flash form to insert data into a ms access database but it is not going too well.
I have 4 input fields on the flash form and a submit button, ActionScript on the Submit button is as follows.[code]...
I am completely new to Flash and actionscript.I have a small project which requires me to submit details into a MS Access Database. I have created an asp scrip to do the same but it doesnt seem to be working. I am posting the code.
my fla code
********
import flash.events.Event;
[code]........
I have a quiz game that i have finish. in this game have a finish button. if the finish button clicked the score from the quiz want to insert into mysql database.
View 1 RepliesI'm using flex to develop my first desktop app and I'm working with sqlite for the first time as well. I'm creating my database and all the tables and I would also like to add a few rows of data into a couple of the tables so that the users have some data to work with on first install.
The only problem I'm having is every time I run the program it keeps inserting the same data over and over again. I'm just wondering if its possible to do a - INSERT INTO IF NOT EXISTS. or some other kind of work around.
I have a function that inserts data into a SQLite database. I can manually add data using
sqlStatement.text = "INSERT INTO users (First_Name, Last_Name) VALUES ('John', 'Doe')";
This works perfectly. Now I am trying to insert the data from a variable instead. I can trace my variable from this function- trace(Main._firstName); //returns John, but when I insert it using this:
sqlStatement.text = "INSERT INTO users (First_Name, Last_Name) VALUES (" + Main._firstName + ", 'Doe')";
it inserts it as "null Doe".
So, here is the question. I have a small flash application that sends some variables to a php script (via POST), and that php script sends them to a mySQL database.
This works fine when I'm testing my flash offline, I go to phpmyadmin, and the registry is done. When I upload the swf to a online html, this stops working. It no longer creates another registry in the database. I have no ideia why this happens.
I read a bit about it and found out about cross domain policy, and thought it might be the problem. Thus I made a small .xml file and uploaded it to both servers (the one the swf is on, and the one that has the database), and its still not working.
[Code]...
I have a Flex application which manage a database composed by 7 tables.I have created the insert form and all work great. Now I wanto to improve the Form performances; the idea is to replace the TextInput of the Form with ComboBoxes which are provided by the DataBase tables
View 1 RepliesI have a datagrid which is editable and I need to send that back to the database via a CFC for insertion into the database after all the editing is complete. Dumping the array collection to cfdump tells me that I have an array with items and a structure but i cannot understand how to "loop" through each and insert into the DB.There seems to be very little written which actually works! My MXML and CFC are below but give me the error of "You have attempted to dereference a scalar variable of type class coldfusion.runtime.Array as a structure with members." -which is nice
[Bindable]
private var getconsent:ArrayCollection = new ArrayCollection([
{LocationName:'Service A', Contact: 'Bob Jones' },
[code].....
Can anyone help me with getting a message that is said in flash (like a game) go to a mysql database?
View 2 RepliesI want to insert data into a SQL Server, but I keep getting this error RPC Fault faultString="SOAP Response cannot be decoded. Raw response:faultCode="DecodingError" faultDetail="null"]
I can get data all day, but why can't I input any?
<mx:WebService id="ws" wsdl="http://localhost:/AService01.asmx?wsdl"
fault="onFault(event)">
<mx:operation
name="GetEmployees"
[Code]...
How do I insert XML data into an ArrayCollection in AS3?
View 2 RepliesI am trying to insert data into a DB, but it won't enter. Here is what I have for the AS:
on(release) {
if(new_player_name ne '')
{[code]....
I have an SWF that calls an XML file to display some images.
When the SWF, XML and image files are all in the same directory the SWF runs fine, displaying all the images.
What I want to do is display the SWF within a HTML page that I have created in dreamweaver.
I've inserted all the files into the same directory within the site and when I test the page the SWF loads but it doesnt carry out any of the actions prescribed in the XML file.
Could anyone point me to a tutorial or tell me where I should put the XML & image files in my site structure and if I need to alter the AS that calls the xml (Currently - xml.load("icons.xml");)
writing a PHP script that will decide to create a new row in mysql or just update an exsisting account and pass the information back to my swf file.. I am sure alot of people would need this when creating a form that updates or creates account information...
View 1 RepliesI'm trying to insert some data into my DB from two Combo Boxes in Flash. I'm not quite sure how to go about it. I have no idea how to give the combo box a 'var' value like we do for a regular textfield. I have other pages where I have regular text fields that work fine as I can specify the 'var' value in the properties but not for combo boxes. I'm new to actionscript so please bear with me.
Action Script for my button:
Code:
on (press) {
loadVariablesNum
("http://localhost/Test/acadForm.asp",0, "post");
[code]....
I need to insert a Box containing some text that appears between the grid header and main content and spans all the grid columns. I've been searching and experimenting (addChildAt()) but no luck so far. Is this possible to achieve?If not, is it possible to dynamically render the text in the header itself, below and spanning the column header text?
View 1 RepliesHow to connect to MYSQL DB from Java, create table, insert data, retrieve it with datatypes. How to make use of the data to/from in Flex application. i have basic knowledge in sending and receiving messages using BlazeDS.
View 1 Replieshow 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.
how to send some data from as3 to a database. I did a little (in fact a lot) of research, and found something useful. But it doesn' t work ... Here's my code:
Actionscript Code:
private function confirmPayment():void { [code]............
I was wondering how to send some data from as3 to a database. I did a little (in fact a lot) of research, and found something useful. But it doesn' t work.[code]
View 1 RepliesIm new to data input using flash,how to connect to a mysql database.
View 5 RepliesI'm wondering if the following can be done with Flash -
- can a swf contain it's own database that the user can add, delete, read?
- while the view is online, entering and interacting with the data- is it being sent back and forth to the server?
- can this database be protected with some sort of encryption that is only unlocked by the user's code?
- and so that if the user emailed the swf or the db file from within the swf, only a person with the key could access the data?
I am reading one tutorial :- But I can't understand what is "Gateway.php" and all such things. I am a beginner in Flash.
View 2 RepliesI have a flash project that connect with a server. I get all data from the server as raw tables as XML. So I have to do the server logics client side. (Don't ask why!)
I have looked for a framework or some code base that have solved this. A framework that can do mapping of keys asf. Basically a frame work that stores the data and handles retrieving of the data like SQL.
Ie. I can get user with the userid without iterating through all the instances. This gets more complex when you have more id in the same table.
So is there a data framework for flash out there?
(the HTML 5 sqlLight would be great if more browsers supported it)
initially when i want to load data from database, it will output all the elements from a tablenow i create a timer to make sure it will query from the database every interval to keep track of the updated content, however, the problem comes in...when i delete a data from there, the data was somehow 'cached' into flash, meaning, it wasn't updated at all.weird thing is, if i port the data over to xml and update the file, the flash would show the updated data correctly
View 9 RepliesI am a beginner using AS3. I'm trying to set up a simple Flash SWF validation of 2 text input boxes' data. In one box the user enters a username and in the second box they enter a password. This is sent to an ASP page which checks the name and password with a SQL Server database on my site. If their name and password are in the database, then the ASP send back to the SWF, "YES" and if not, "NO". The AS3 could then use an if/else: if "YES" then gotoAndPlay(2), or else display a message.The ASP script/page is completed. I've tested it with another program, and it works to check the DB and get back data.My AS3 is not working.e AS3 script to get it working.Here's the script so far. It get a trace of: [object URLRequest]. So I do not get any data back.
ActionScript Code:
stop()
nextBtn.addEventListener(MouseEvent.CLICK, nextBtnClick, false, 0, true);
[code].....
How do i retrieve data in database using AS3?[code]...
View 2 Repliesi am trying to build a web application wherein i have two display data in two text fields. one text will display the Resort name and the other one will display the URL related to the resort.There are only two fields.
View 5 RepliesI have to fetch data from database into the flash..
View 1 Replies