ActionScript 2.0 :: Collect Dynamic Variables In Flash To Send To .php File?
Jun 27, 2003
Let a qualified-user place a dot on a country map and this dot will be shown on the map. When other users come by they see dot's and those dot's trigger a image.
1 Create a map, duh
2 Use the mouse to get the coordinates (_x and _y position) onRelease will be the selected coordinates.
3 Create a preview-scene were the qualified user sees the placement of his dot.
4 If oke, a image upload scene is triggered (the selected _x and _y coordinates are hidden)
5 The qualified user selects a image on his computer.
6 Again a preview scene, now with the dot on the map and the selected image.
7 If oke the user sends the coordinates and image to the server (i will use php-files to upload the info and a mysql-db to store the info)
I am stuck with step 2. In the attach file you can see what i have so fare.The trace messages are the data i want to send to a php script. And think i must create an array in flash something like:
Code:
coords = new array();
for (i=0;i<=v;i++)[code]...
You gotta see the attach .fla to understand this. I have the values collected in "controller" movieClip.
I'm pretty inexperienced with actionscript, and I'm having the hardest time trying to figure out how to load variables from a file and send it to a dynamic text box. The content of an external file, "varload.txt", is "name1=John". Here is actionscript of my flash file:
Im pretty new with the flash -> php -> mysql thing .. And I have made a script that sends some variables (that a user inserts in some input forms) with some var names, and then php handles it and insert it into my MySQL database its kinda ugly that a page pops up and opens the php page.So I was wonderin' if there is some way to send the variables to the php file and process them inside the flash file. without openin' some fancy browser window ?
Can i put ACTIONSCRIPT inside a xml file and make it work inside a swf?Since is not basic, where can i learn more about xml processing instructions?Other thing....Can a php file that send variables to flash WITHOUT the swf ask for it?
I'm looking to send a list of variables (say 6 in total) from php to flash and for flash to pick a random one and send it back to php when clicking a button.
I would like it to appear in a dynamic text box. That randomly selected variable needs to be sent back to php on pressing a button.
I'm looking to send a list of variables (say 6 in total) from php to flash and for flash to pick a random one and send it back to php when clicking a button. I would like it to appear in a dynamic text box. That randomly selected variable needs to be sent back to php on pressing a button.
I'm trying to send variables to a payment gateway (dibs) and need to post variables to the likes of[code]...
In creating a dynamic variable I'm doing this, which works. But it's not posting the values to the php-page. (The "normal" variables are being posted just fine, so the error isn't there) [code]...
I've searched everywhere, but can't find one thread/result that suits my situation.I'm trying to post data into a database, through php. I don't want to reload the page, so I want this to happen through Flash. I thought about using the LoadVars() class, but it just simply isn't working.How would I about doing this? Say I have three variables, blah1, blah2, and blah3, all of which are strings. How do I send these variables to a php page with the POST method?
I'm trying to create a file that shows data from a database depending on an id number the user inputs in Flash. I am having trouble sending to PHP the id so it sends back the appropriate data from the db.
This is the AS3 code that tries to send the value of the idNumber to PHP[code]...
I have the livedocs wide open and I still can't figure out how to send off multiple variables in an object (from a class) to the FLA file...[URL] The setup: I have a class that extends EventDispatcher. I created an Object called _pass, public var _pass:Object;. In my last function (everything is cool up until now), I have four variables that need to be passed to the main fla. Let's say they're param1, param2, param3, param4.
It was explained to me that I could use the public var _pass:Object; by first creating an instance of the object like so, _pass = { param1, param2, param3, param4 }; (each param is available in the function). Having setup an object instance, I could then dispatch the object to read from within my fla: dispatchEvent(new Event(Event.COMPLETE));.
But I get these errors:
1084: Syntax error: expecting colon before comma. 1083: Syntax error: rightbrace is unexpected.
As the livedocs show, you can use an associative array (with braces and a colon), but I don't need that. I just need to pass my variables that are pre-made to the FLA.
I am trying to create a simple form using Actionscript 3 that will collect data from a form, then pass that data to an asp file. I have attached the following code to the submit button,but this is not working.I'm not sure if I have to add anything else and I don't understand why this is not working. I'm trying to load all the variable info into one variable called email form.
submit_btn.onRelease = function() { var emailform:text; emailform.email_txt = email_txt.text;[code]......
I have a simple banner that has three choices. A, B, and C. When a user clicks on one of the choices...I just need a counter to make note of it...in some remote file. Php I would guess.So the end result is that you could access the php file and see that choice A was clicked however many times, and choice B was clicked so many times, etc.But I am not a Php guy and don't know what syntax to use to make this happen.
I saw that there are lots of ways to send info or values from flash to PHP. But is there a way to do the REVERSE? Send variables or values from a php to a flash and this same flash movie react to those values?
I have a simple banner that has three choices. A, B, and C. When a user clicks on one of the choices...I just need a counter to make note of it...in some remote file. Php
So the end result is that you could access the php file and see that choice A was clicked however many times, and choice B was clicked so many times, etc.
But I am not a Php guy and don't know what syntax to use to make this happen.
I am searching how to send variables from a php webpage to a flash animation that it will be integrated into anther webpage ... Little exmple : An user enter his name in an input in a php page then when he clicks submit button his name will be shown in a flash animation
I have a flash player embedded on page page.php?user=john using swfobject. The player calls the xml file content.php to get the results. I'm trying to get the user name from the url id. and fetch results based on that. I can get the username on page.php by doing $_GET['user'], but how can i pass that to content.php. Having read allot of articles online, i did the following,I'm embedding the flash on page.php using swfobject like this
<script type="text/javascript"> var flashvars = {user:"<?php $_GET[user] ?>"}; var so = new SWFObject("<?php echo $index->CFG['site']['url'];?>preview2.swf", "sotester",
I am new in flash actionscript... I am just starting to learn...How can I send variables from my flash project to PHP and get the resulting values back???
Im having a bit of trouble integrating dynamic variables pulled from a databse using an ASP script with a flash movie.
Background:
I need to send variables stored in a ms sql db to a flash movie to display several values.
The dyanmic element comes in because i am using an ID to select the values from the db e.g id1 = joe bloggs id2 = paul smith
etc
When i am hardcoding the id in the asp script the variables are sent to the flash movie no probs and they display correctly.
I am also printing the asp code on the page and that all displaying fine.
HOWEVER, the issue arises when i make the asp code dynamic and by that i mean I am using request.querystring to pull the id
from the URL - The print out of the asp code is still displaying the correct variables, BUT they are not being passed to the
flash movie at all - the placeholder is blank there isn't event an error!!.
Couple of things to note -
- if you change the id bit of the url in the dynamic script to the printed asp code changes
- THE FLASH MOVIE IS IDENTIAL in both scenarios
- all variable names have remained the same
- it is NOT a location of file issue as we have tested the dynamic code files In another folder and no joy
- we are not using any other file includes or asp code in any of the page - all other code has been stripped out
THE ISSUE WE HAVE IS THAT THE PRINTED VARIABLES ARE NOT BEING PASSED TO THE FLASH MOBIE in scenario 2 where the asp code is looking for the participant id dynamically (i.e from the URL)
I know there were many messages posted regarding sending variables from flash to php. I wrote a small code where in I used send() method of LoadVar object, it sends the message but it reloads the php page which I do not want it to do. I tried using sendAndLoad() and here it does not send any variable at all. Below is my sample code.
I know there were many messages posted regarding sending variables from flash to php. But I am facing a problem. I wrote a small code where in I used send() method of LoadVar object, it sends the message but it reloads the php page which I do not want it to do. I tried using sendAndLoad() and here it does not send any variable at all.[code]
I need to find a way to detect keystrokes when the flash file is not selected and send that information to an .swf file. The file would be stored locally (not on the internet).
And 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 wanna send a dynamic variable from flash to php.[code]in this php file i want to change "$i" dynamically... which the data from from flash should update.when i give 2 then database should fetch fp_id =2, if i give 1 ishoud get fp_id 1.