ActionScript 2.0 :: Posting An Array To Php?
Oct 20, 2005I have an array that I need to send to a php script to process it.How do I do it? It can't be that hard can it? I can't find any info on it anywhere!
View 5 RepliesI have an array that I need to send to a php script to process it.How do I do it? It can't be that hard can it? I can't find any info on it anywhere!
View 5 RepliesI am trying to use the code below to get the info from the arrays and if the value is +,-,* or / the array value is posted into a new array otherwise it is posted to a number array:
Code:
var i = 0;
operator = new Array();
calc = new Array();
var myArray = ["0","1","+","2","*","5"];
while(myArray.length > 0){
[Code] .....
Which shows the length at only 1??? however the code seems fine from the other trace info.
in my PHP, if I post to two variables, ie:
$myxml1 = $_POST["filename1"];
$myxml2 = $_POST["filename2"];
it all works fine. However, if I post to an array....
$myxml[0] = $_POST["filename1"];
$myxml[1] = $_POST["filename2"];
[Code]...
all I'm trying to do is set the variable names of two input text boxes and then post those to a php file... in the php file I just want to echo back those two variables
View 10 RepliesI have an ongoing project that outputs xml data to my client's server via a php script. The client would like to move the XML into a database, and their database company has instructed me to POST the XML to a web address with a form field linked to the database. This produces a server error (if I manually paste the XML into the form it works). In order to get this to work, does there need to be a PHP or some other server side script between Flash and the database
View 12 Repliesam trying to use AS 3 (for which I have beginner skill) to send and receive data to/from an ASP page (this ASP page is done) that interacts with a MS SQL databaseThe Flash SWF would send a name and password entered by the user in the SWF to the ASP page; the ASP page script (already written) would check with the DB, return either YES or NO (YES if the name/password is found, NO if not), plus return a score number, and then the ASP page script would write these 2 variables as a response to the Flash SWF (var data = YES or var data = NO, plus var score = 'the score numeric value'.
View 4 RepliesI have a simple form in my flash cs4...I am unable to get it to post to the php script here is the code I have:
Code:
var req:URLRequest=new URLRequest("mailer.php");
var vars:URLVariables = new URLVariables();
[code].....
I'm wondering what is the best way to post arbitrary data to the server in the same format, as forms in web browser? I'm using this thing by now, and it seems it more useful to load data from server, but not the uploads.
View 3 RepliesI am having trouble embedding a flash file onto my website. I tried another file, which worked.
View 2 RepliesI am trying to post a "tweet" to my twitter using Flex (using the Flex 3.5 SDK and Flex Builder 4 if that makes any difference). On an mxml file I've created a button simply to make it easy to call an AS3 function, and in the function, I'm making a URL request. Obviously I'm doing something wrong, because my tweet ain't posting. I got these variables in the curl request provided by Twitter themselves, which actually worked. My guess is that I'm formatting something incorrectly, but I don't know what that is. Here is the code I'm using:
[Code]....
Posting Image to Facebook with Flash?
View 1 RepliesI've created an flash application that will post variables to a PHP page. This PHP page will then take the variables and using GD Libraries, create a JPEG image on my server and save it. I'm writing in AS3 based on the AS2 tutorial I found here.The variables I'm sending are height and width of the image, and then a very long string containing all the values of the pixel colours, with rows and columns separated by characters. (ie ffffff,dddddd-aaaaaa,cccccc). The example here is only a 2x2 image, so a small 400x300 image is 120,000 pixels x 6 characters = 720,000 characters + all the separators! This method is working quite well, but can take about 20-30 seconds to send on a slow connection.My explanation is very long but the question is quite simple. I know you can get progress events and bytesTotal and bytesLoaded on incoming URLVariables, but has anyone discovered a way to track the progress of sending out variables?
View 0 RepliesIve been tinkering with some games which post the user's score to a php file, which writes the data to a database... but Ive discovered that in some browsers I get this error. I googled some URLencoding tools for AS3 (came up with URIencode which seems to be connected to javascript somehow?!),
Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
at Error$/throwError()[code].....
Is there a simple way to post an image to facebook in a small flash interactive. Its not an air or flex application, just a simple drawing swf. I'm already using the jpeg encoder to allow users to downlaod their image, but I'd love to be able to post the same jpeg.draw(); to post to facebook...
View 3 RepliesI've got my existing script working to send form information to PHP and it emails back to me just fine.Now I want to keep what I've got and include a check box that sends a "Yes" or "No" to the email message body, depending on whether the state is true or false.I'm assuming this is really easy, and I've fiddled with PHP, I just have no idea how to do it properly after looking at a few places.For reference the instance name of the check box is "contact_tick"Here's the script for Flash:
Code: Select allsend_button.onRelease = submit;
reset_button.onRelease = reset;
function submit()
[code].....
There's a common strategy for posting to a database where a serverside page is called, passing it querystring data, in order to add entries to a database.
This is not secure though, anyone can decompile the .swf and hack the database by calling the serverside page with their own info. Does anyone know of a secure strategy that does not rely on obfuscation?
I got to create a web site for school. And I'm going to create a little flash, where someone posts sth very small and the last thing posted is shown in flash, and there is a form where you write and submit.And it should save the stuff posted in a text and people should be able to look at it.Actually, I have "no" idea where to start or what to do. Because I only know HTML, a little XML and AS. If someone could create something like that, it would be great because I could use it as a tutorial and learn some new stuff.
View 5 RepliesI have a flash game that asks the user to enter his username & password then he can start playing the game. After that the score gets saved to MySQL next to his username & password. The final step is to display his scores in the flash game. Everything works fine except for the last step which is calling back the scores from MySQL to the flash game.
I call the scores from MySQL using PHP file which sends the data to flash through XML. I can call the data from MySQL & display it in flash BUT I should enter a specific user name manually in the PHP file. The problem is that I can't make the flash game display the scores of the logged in user. for example: User A signs-in, plays the game, his/her score gets saved & then the problem occurs calling back his/her scores to the flash. In order to display User A scores in the Flash , I should replace the $username variable in the PHP file with "User A" so the scores can be displayed in the Flash file.
[Code]...
when i pressed print button it prints the page but the php file will open in another window. How can i Stop this.[code]
View 1 RepliesI am working in Flash CS4. I have successfully run a .wmv file through the Media Encoder, converted it to a f4v file, imported it into Flash, and published it with a skin to a folder on my hard drive.I am learning this on my own (no one else in my state agency knows Flash - we are just getting started with posting videos on the Internet, and this is the test case).I get the following four files in one folder on my hard drive (I have put in parentheses what I think the files do, please correct if I am wrong):
oil.f4v (the movie file)
Test.html (the html page in which the swf file is embedded to play back the movie)
Test.swf (the swf file that is embedded in the html page)
SkinUnderPlayStopSeekMuteVol.swf (the skin file that is linked to from the Test.swf file??)
My question is: As long as these four files stay in the original folder, the html page plays the movie perfectly. As soon as I rename the folder, nothing works. It appears to be a question of re-establishing a relative/absolute link among the files? I want to post these to my live site in order to test, but of course that won't work yet either.
How do you post code within the body of a message, so that it is formatted and set apart from regular text. I haven't seen where this is listed in FAQ.
View 5 RepliesI'm trying to save a file using HTTP request from a SWF file to an ASPX file. i have a WinForms app that hosts the SWF using AxShockwaveFlash control that passes parameters to the SWF that generats the file and posts it to an ASPX page. the page uses the binary data to save the binary stream to a file in the following way:
[Code]...
I want to post data to a URL on my server from a Flex app. I am using the following
UrlParam = UrlParam + '&name='+ name.text + '&business=' + buisness.text; navigateToURL(new URLRequest(UrlParams),'_self');
The problem I am having however is that if I enter a business with an ampersand ("A&b.com") then the name does not send. Does Flex have anything out of the box to do the encoding from & to %26?
I am trying to create a facebook application that will allow me to post to a fanpage wall once installed. to be honest i am a newbie when it comes to actionscript and am just looking for a simple solution. I have set one up that allows me to post to a personal profile but dont know how to do so for my fanpage.
View 0 RepliesHI'm using the "PublishPost" method form the "AS3/Facebook API" to publish in the current user wall, but Facebook returns me a code:200 "Permissions Error", I'm just using the simple following code:
1. --------------------------------------------------------------------- -----------------------------------session = new FacebookSessionUtil( this.API_KEY, this.SECRET_KEY, this.scope.loaderInfo );fbook = session.facebook;session.verifySession();
2.PostTool.postInWall( fbook );
3. (inside a PostTool class)
static public function postInWall( fbook:Facebook, message:String = "... Testing..." ):void {
var post:PublishPost = new PublishPost( message ); var call:FacebookCall = fbook.post( post ); call.addEventListener( FacebookEvent.COMPLETE, completeHandler ); }[code].....
Creating an RSS reader. One feature is that should parse several "category" nodes from a feed. But when I load a feed, the category doesn't shows up in the text area. Flash returns no errors. Heres the code -
[Code]...
How I can send some text in a dynamic flash textfield to a mySQL database and vice versa? Basically I've created a text field - assuming it has to be dynamic (with an instance name of "tUserdata"), it's going to be multiline text, and upto 255 characters. As the user clicks the submit button, the data held in the flash text field is sent to the mySQL database and stored there. I understand that i have to use PHP as well - and heard i need to use the loadVars function. Need Coding in PHP and connecting to a MySQL database, and what actionscript I need to insert.
View 3 RepliesI have to update a form that's currently using the Vars property of Input Text fields to post every variable (even the ones that we don't want) to a CGI script. But I'd like to move the code forward, and get rid of some of these deprecated features; so I'm looking for an elegant solution to posting the desired variables to a CGI script, rather than every single one.
View 1 RepliesI've created a function to send Post data to my server, and this then outputs xml to the page. What I can't find any information on how to get this data from the page back into flash.
View 2 RepliesThe component itself receives all its parameters from a .txt file. The editor is a read/save form that initially loads the parameters into it's form fields, and then overwrites the .txt file when the user hits submit. You then refresh the component on whatever website you have it to see the changes.Here's the php code that I found to get me going:
<?php //Capture data from $_POST array $title = $_POST['Title']; $comments = $_POST['Comments']; $image = $_POST['Image'] //Make one big string in a format Flash understand $toSave = "Title=".$title."&Comments=".$comments."&Image=".$image;
[code].....