ActionScript 2.0 :: Flash Submit Writing To Txt File?
Apr 24, 2005how to make it so you can write a message and then hit submit with the componates and have it write to a text file?
View 3 Replieshow to make it so you can write a message and then hit submit with the componates and have it write to a text file?
View 3 RepliesI have a flash form that need to submit values to a PHP file.I am using in flash: varsToSend.send("subsrcibe.php","process","POST"); The "subsrcibe.php" contains a form that is connected directly to a database.What i want to do is, to load the variables from Flash to this PHP file, and then submit them automatically to the database (The PHP page should not open to the users).
View 2 RepliesDoes anybody know a tutorial or something about writing to a txt file in Flash AS3?
View 4 RepliesI'm trying to find a way to write to a text file from as2. I don't want to use any php or asp because my app needs to run without an internet connection. As3 has FileReference.save() and judging by the amount of searching I've done, as2 doesn't have that simple of a solution. Does anyone have a way even if its hacky to write to a txt file from as2?
View 1 RepliesI have been trying to save data from a flash movie to an XML file and have failed to do so how is it possible? how can i for example save a text from a textbox / textarea to an XML file in an specific XML node by pressing a botton? although i am familiar with how to extract data saved in XML files and desplay it in a flash movie.
View 7 RepliesIve been doing some research and I cant seem to find anything on writing to a file. My initial question was writing a array to a seperate file. But now I am looking for resources on how to write any data such as XML or a array to a file. What I want to do is create a game editor. I want to eventually save that data to a file to be opened later.
View 1 RepliesI have a simple form in Flash. I need to write the data from the input text fields to a local text file. I need the text file to append after each submission of the form to include all entries. Sounds simple?
View 1 RepliesI am trying to write a class file using a .as file instead of writing code into the script tab of a .fla file.When I write stage.addChild(img); I get an error that stage is null. When I take out stage, and just write addChild(img); the code runs fine, but nothing appears on stage. Do I need to do something to set a stage active?
Is this because I don't have a Main class? My class is named after the file and I don't have a file named Main.Here is the code. As it is, it runs and I get the two trace outputs, but no graphic on my screen.
package { import flash.display.DisplayObject; import flash.display.Sprite; import flash.display.Loader; import flash.events.*; import flash.net.*; public class HelloWorldImage extends Sprite { private var background:DisplayObject, foreground:DisplayObject; private var url:String = "hw_jpg.jpg"; private var loader:Loader = new Loader( ); public function
[code].....
I am having a problem getting Flash to work with PHP as I need Flash to read and write to a text file on a server to store simple name/score data for a games hi score table. I can read from the text file into Flash easily enough but also need to write to the file when a new high score is reached, so I need to use PHP to do that. I can send the data from flash to the php file via POST but so far it is not working. The PHP file is confirmed as working as I added an echo to the file which displayed a message so I could check that the server was running PHP - the files were also uploaded to a remote server so I could test them properly. Flash code is as follows:
//php filewriter
var myLV = new LoadVars();
function sendData() {
//sets up variable 'hsdata' to send to php
myLV.hsdata = myText;
myLV.send("hiscores.php");
}
I believe this sends the variable 'myText' to the php file as a variable called 'hsdata' which I want the php file to write into a text file. The mytext variable is just a long string that has all the scores and names in the hiscore. OK, XML would be better way of doing this but for speed I just want to get basic functionality working, so storing a simple text sting is adequate for now. The PHP code that reads the Flash 'hsdata' variable and writes it to the text file 'scores.txt' follows:
[Code]...
I am wondering if it is possible to use random file access for reading and writing data to file in Actionscipt 3.0 similar to that what is in Visual Basic?
View 1 RepliesI do understand the differance between ssas and as3. Not all, but all most everything I see written in SSAS can be writen into a external AS3 file. This leads me to quite a few questions I'm hoping you kind people can shed some light on for me.
1) What is the advantage of writing a SSAS file over an external AS3 file?
2) Can I write an .asc file in AS3 or do I have to use AS1? Please understand I'm using tuts from fmsguru.com and the books "Learning Flash Media Server" (pdf) and "Programming Flash Communication Server". I'm not a javascript programmer so nothing I do in AS1 seems to make any sence while everything I do in AS3 does. It may not seem like it to you people that are programmers, but to those of us that aren't, AS1 and AS3 are miles apart.
3) kind of off topic, but a security question. I'm not a "hacker" and don't like the jerks that are. My question is on external AS / SSAS files and swf files. When my fla is compiled into a swf does my external AS files remain external? I assume they do, but then what is the threat of the swf being decompiled? In most projects I would do I could care less if somebody had access to my fla as long as they don't have my actionscript files.
I don't know. Maybe on questions one and two I'm getting confused becasue I'm using out dated material. Again I assume that even though fms was built off of the javascript engine it should be able to read and execute my AS3 file. Other wise what was the point of the evolution of actionscript into a fully functional programming language?
I have added following code on form submit button:
on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("[URL]",
"POST");
}
Another this is that I have to pass the id along with this url. But I am not getting how to get id from my XML file.
Structure of XML is as follows:
<ratings><video file="video1.flv">
<title>Lays</title><runtime>auto</runtime>
<author>Bharati 1</author>
<views>1</views><commercialid></commercialid>
[Code] .....
I have a submit button created in an Actionscript file. I want to send data when user clicks the submit button(never mind how the data is sent-I just need to check the event listeners). I tried placing an event listener for the button in the AS file like so: I'm getting an error about undefined method,blahblah so I tried going through the main timeline. Go to frame 146(labeled "this"). myform creates instance of class formtest; subbtn is the name of the button created in the formtest.as file. how the heck do I remove this form when user exits frame?
View 2 RepliesI have an menu for user to populate it. Then when the user finish, I would like to store his Order into an XML database. I do not know how to write to XML file in Flash.
View 9 RepliesI have an HTML form that I want to upload to MySQL with PHP. That part's easy, but the thing is I want the submit button to be a Flash object. Somehow I need the Flash button to submit the form, but I think I can figure that out. The tricky part is that I need it to set another PHP variable before submitting the form. The variable will be determined by a bunch of stuff, but I can code that in actionscript later. I just need to figure out how to pass the variable back to the webpage. A $_POST variable would probably be fine.
edit: What if the flash object returned some javascript and set a variable that way? making it submit the form as well while still catching a variable?
i load in xml file so i can read the data. i've figured out how to add, delete and modify data. but the problem is, is that even when i do that it only does it within flash it doesn't make the changes to the actual file.so i want someone to help me do this. so please help i've been at this for week and its time i ask you nice and incredibly smart people.
here is my file, its clean and organized as its something i whipped up for the sake of figuring this out.i found this, people say it allows you to save the xml data, which would work, if i have to delete a file i can do that, i know how to do that. the script i found to do this is below incase it helps you guys to help me.
Code:
package com.hodgedev.xmlcreator
{
import flash.display.Sprite;
import flash.events.Event;
[code]....
is it possible to post to php in an .exe file instead of a .swf displayed inside a browser? If so, how? I figured if you just created the .exe on the server with the .php file in the same folder it would read it and work fine.
View 2 RepliesI have successfully read an XML file into my script and used the data.Very handy.Now, I want to be able to create an XML file and save it.I have seen in the documentation how to add a child and so on - so I think I can manage that bit.I assume that I can save a file (locally) - but how? I have not been able to find a 'save'.
View 5 RepliesI have looked far and wide but I can't find any resources on how to write to CSV files from flash AS3. I know that flash cannot write to it alone. I have used PHP before to write to a txt file but now I need to open a csv and insert/edit entries that are already in it.
View 1 RepliesI've got all these flash books, yet not one of them tells me if it's possible to write to a txt file. They show how to read from a txt file using loadVariables(), but not the reverse.
View 11 RepliesWell I've been trying for about 2-3 days with no success. I am using the POST method and its not working. I have gotten it to work before.... but I do not have the old files anymore. There is a text box on the stage with the instance name: textTxt the fla fla Code:
Code:
var variables:URLVariables;
var fLoader:URLLoader;
var fData:URLRequest;
[Code]....
I am working on a survey project where I want a user's answers to get logged to a text file. I used the code from this post to make a php script in an attempt to do this: [URL]
I modified it as follows:
var urlLDR:URLLoader=new URLLoader();
var urlR:URLRequest = new URLRequest( "filewriter.php" );
var urlVar:URLVariables = new URLVariables();
[Code]....
When I run my movie, it does not invoke the PHP script. why it is not working? Are there alternative methods to logging this data to a text file?
Anyone know of any code I can add to my project to keep a log of how many times a button is pressed? Ideally it would write to the disk with date/time stamp.
View 1 RepliesI'm using Flash CS3 and AS3 to create a stand alone app to run a kiosk. At the end of the kiosk we have a spot for a user to input comments and I want to write the contents of 2 text boxes when the submit button is clicked to a .txt file on the system that an administrator can approve and copy to a new file to be read in to the app and displayed. I've figured out how to read the external txt file easily enough, but there are so many conflicting things online regarding writing an external text file I haven't done any serious programming in 8+ years so I'm also relearning programming with this project.
View 3 RepliesIs there a way where I can write to a text file from flash using Actionscript?
I want to save some values from a variable and reload that values when i run flash again.
Is there a way where I can write to a text file from flash using Actionscript? I want to save some values from a variable and reload that values when i run flash again.
View 3 RepliesIs there a way to do file reading and writing in flash, like using actionscript 2.0? Just like how we do it in C++. Like read variables or a string from a .txt file and write in it.
View 9 RepliesI'm building a standalone projector which will be run locally without an internet connection. is it possible to be able to write variables to a text file on the computer?
View 1 RepliesI am able to load xml file but I want to know how should I do following taks using ActionScript 3.0
1] Create New XML File.
2] Updating XML File.
3] Overwriting XML File.
please give me guidence about xml file CRUD(Create/Read/Update/Delete) operation using ActionScript 3.0.
Does AS3 write to an external text file? If so, how?
View 8 Replies