ActionScript 3.0 :: Getting A Variable Back To Flash From Database?
Apr 20, 2010
I have read hundreds of forum and done a tonne of tutorials but i can not get it working.I have a login section with a password and I want to send a userId back from my user database as I use the userId in another section of my website. I was thinking of making $userID GLOBAL and trying to call it from another php file but I think I'm so confused now nothing is working including my brain.
We are working on a 3rd party application build on Adobe Flash technology to render business dashboards.This application does'nt offer us to generate the whole code rather it's just a drag n drop of charts, text boxes etc components, and then mapping of data. After all of customizing, the application itself generates an SWF file finally.
What our requirement is we need to make our dashboard(a falsh file) to write a chunk of data, eneterd by user, back into our database by a user action, like a button click. (Access, MySQL, Oracle or any). Now our application offers the FSCOMMAND function call wherein we can enter the command name and args.
Now we need to use this FSCOMMAND function to write back to databases because we believe this is the only option with us within our app. What is the command to write back to a database, and then the arguments. Also, do we need to write any JAVA/VB script for that. Please be informed that our application itself generates the whole SWF file code..all HTML coding. {e.g as we include queryparam, "mapped data", using FSCOMMAND, i can see the whole code generated by the app, the HTML code, wherein I could see embedded Java Script with DO_FScommand statament carrying this queryparam command and args..etc.}
Kindly show us the way to acheive this crucial requirement of ours. We are looking for very elaborative answers as we have less expertise with scripts.
I know that I can send a string back to AS2 and read it but I'm not sure how to work with arrays, do I have to save everything to an array and pass the array to AS2 and then have a function in AS2 to output all the elements of the array to the dynamic text box?
I'm calling a JS function with ExternalInterface.call and trying to get a return value inside Flash. When I trace out the op variable I get 0 instead of 500. Is there something wrong with my embed code?[code]
i want to intertwine php, MySql and flash. so i can make a flash movie display text that is in the sql database and a php script to change the database, php > sql = i can do but sql > flash = i can't do..i want it so the sql data show's in a text box in the flash movie...
Is it possible to create a database driven website using these alone? Or do i need to learn any other technology? If i do then what should i learn? I know j2se for the desktop and oracle SQL/MySQL i finally got the feeling that i need to learn PHP anyway along with css and javascript. So it is fine. Also another query. Which CMS should i consider? Wordpress or Joomla?
i have to files that i know are interacting but it is not assigning the variable as i need it.i need to get the value from the database and assign is to the variable in the swf file not seeing what is wrong: php code.[code]
I have a database on a server and I transfer the data from it to a web site. So I need to build a flash grid on this site and to load the data on it. But the problem is that I do not know how to do it. So my question is how to build a dynamic flash grid wich is fill with data from a database? Is there a way to do it with action script only or I must do it another way?
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:
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] .....
I am trying to include a Variable from PHP which queries a database with a dynamic file..Obviously I have marked out passwords with "*"Here is My Php file to display the variables I need
[Code]...
What I need to do is have the flash file pull in videoid which is a string on a dynamic link from the page where the player resides. VideoID is dynamically created in the Mysql Database..how to get this dynamically into the flash file?
I have a slideshow that I want to loop. What it does is load an xml file with the locations of the images. It uses an int variable to progress from one image to the next. What i need it to do is when it gets to the end of the list, to go back to the beginning, essentially setting imgNum back to 0. So I figured a simple if/else statement would do the trick, but I just keep getting a "TypeError: Error #1010: A term is undefined and has no properties." no matter what I try. The nextImage function is triggered via the movieclip that runs once the loader is done and has been added as a child to a placeholder inside said movieclip. Here's the code:
I'm developing a project with Flex, Spring, Hibernate, MySQL, Tomcat, but one of the functionality is: " i have to store a mathematical rule like for example " a+b " into database, then in my human machine interface, i have two fields when user write the variables "a" and "b", then a button with the label calculate which if it's clicked, it'll show bellow the result of applying the rule " a+b " to the variables "a" and "b" which the user previously." Now, i'm searching for an Java or Flex API or any other way that will give me the ability to apply a mathematical rule stored in database as string, to variables i got from human machine interface"
I have a GUI using Flex. I have a condition like i need to execute some command line arguments in the local machine and get the results back or output back to a textbox area. How can i do a button on submit, execute command in the local machine and return the output?Command to execute example:
echo logfile.log | grep username
Code:
button1.onRelease = function () { // in this computer, it will now run a command, please wait. }
Im currently programming a game and having the character animation respond to the spacebar to play a jump animation.
To cut the code down here is the bit that's the problem:
ActionScript Code: var space:Boolean = false; if (evt.keyCode == Keyboard.SPACE && space == false)
[Code]....
The script works great, apart from when the animation is over, the variable 'space' is set to true, but I need it to go back to false after the function has been applied.
Here is the action script in flash MX that im using
function doSubmit(){ sendData = new LoadVars(); recData = new LoadVars();[code].....
I am able to send data to the database but the script does not send back the variable data "success".I have 2 input fields on my form, one drop down and 2 radio buttons, a dynamic text field and a Butto.the data from the input fields, the drop down and tyhe radio buttons all get to the database, this part is working great.The dynamic text field shows the data from the error loading variable "Error Loading file".When it should have picked up the variable from the php variable and show the word "Success".Does anyone know why it send my data to the database and won't return the variable from php?
I set a variable var currentPage:String = "b1"; When I click a button, the click should change the variable currentPage to the event.currentTarget.name and it does
I want to create a Flex 3 application running in Adobe Air that accesses an SQLite database and I need to keep this database in sync with an SQL server 2005 database running a website.Is this something that Flex supports or is it going to be a custom script? Also, has anybody done anything like this?
Edit: The synchronisation can be done on a daily basis rather than real time. The data will be read only from a front end perspective with a CMS to do updates on the website.
I'm trying to make a game that is turn-based and allows players to first be selected, then click on a grid square to move there. However, I can't get a way for a variable storing whether the player is selected to be passed back to the actual grid class. I want the grid class to have an event listener that when the grid is clicked on, it will move the player there only if the player is selected. But whenever I try to declare a global variable either inside the grid class or even a document class or even access properties of the character class I'm trying to move I get errors.
I have researched this issue all over and most people say use the .refresh() method to update a datagrid after updating or adding a new record. This does not do anything. So, my issue is this. I have a mySQL database hosted I am connecting via PHP, I have 1 mxml file and 2 php files (I know I can use just 1 but I am learning and this was easier for me to use for troubleshooting). The issue is no matter what I change on the datagrid the update does not show on the datagrid unless I close out of IE and reopen it. I can refresh or open the page in another window and the update does not show. I have to exit entirely and restart in order for any updates or additions to show.Here is my licenseTracker.mxml
I am working on a function to generate a form at runtime in Flex based on a call to the DB. The call to the DB returns the field types, id, tooltips etc as an arraycollection, the arraycollection is then parsed in order to ascertain what control to display based on the type field in the array - this bit works fine.However, i am stuck on trying to save the form fields back to the database using a CFC.my form rendering code is as follows but how do i save values entered back to the database? rendering code..
[Bindable] public var getglobalprofileb:ArrayCollection; public function init(event:ResultEvent):void {[code].......
I have updated the mxml code to only show the needed code for the program to run the update.
I am new to Flex and have an issue I hope you all can help me out with.
I have researched this issue all over and most people say use the .refresh() method to update a datagrid after updating or adding a new record. This does not do anything.
So, my issue is this. I have a mySQL database hosted on 000webhost.com, I am connecting via PHP, I have 1 mxml file and 2 php files (I know I can use just 1 but I am learning and this was easier for me to use for troubleshooting). The issue is no matter what I change on the datagrid the update does not show on the datagrid unless I close out of IE and reopen it. I can refresh or open the page in another window and the update does not show. I have to exit entirely and restart in order for any updates or additions to show.
I am planning on using Flash Builder 4/Flex to write an AIR application which is primarily based around recording, storing and analyzing data.I'll be creating charts etc that need to update in almost real time.It's essential to me that the application be able to function without an internet connection so I need a local database of some variety,but I would also eventually like to build in online synchronization of the data where either database can be update each other based on newer information. Moreover, some type of encryption would definitely be welcome, and speed is a large concern
Synchronization: Primarily updates/additions/deletions will be done on the offline database, but ideally I want to have a web interface that will allow the same updates/additions/deletions and will be synced (beyond that I'm not sure exactly how to do it as I can model that based on what is most achievable).I'm wondering if there's any prebuilt engine that could handle the synchronization of 2 databases. I may end up having the web interface only be for additions, which would be significantly easier to sync.. and I may start that way, but i want to build with technologies that will best allow me to implement full online crud at some point.
Here is the issue: a client wants his entire equipment inventory accessible by persons navigating to his jquery mobile site. The inventory that exists on the desktop site was, as I understood, built with Flex. Is it possible to access this database for the jquery mobile site? I believe it is. I was then given this information from someone in the know:
I am planning to develop a standalone application, which infact will be used for personal purposes. So only single user access may be there. I want to develop it in Flex. Just want some opinions from the gurus over here : Whether i should use Flex or AIR (I know only Flex, AIR i need to start learning)Which database i should use? SQLLite or HSQLDB or some other.