ActionScript 2.0 :: Writing Data To A Text File?
Oct 21, 2002How can i write data to a text file like user's score, date & last frame visited etc... can the file to be written to an unix environment.
View 8 RepliesHow can i write data to a text file like user's score, date & last frame visited etc... can the file to be written to an unix environment.
View 8 RepliesI want to write some data stored in a string variable into a text(txt) file.
View 4 RepliesI 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 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 RepliesHow can Flash AS3.0 Read file text while text file still writing by C++ program ?
I have some code that I asked before + I modify some line but It can read only text file that completely writing.
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
[Code]....
Now My task is read real time file and send xArray and yArray to another function but I don't know how can I code it.
I've to make a form that's going to work on a local machine without internet during an event. I have a form i'm using for our website, but this one just sends emails.The data needs to be written to a file (Excel / XML ?) which we, after the event, tranfer to another computer and add the list of subscriptions in our company network.
View 1 RepliesHow can I save data to a text file and also append a record to data in an existing text file? I've used Authowrware previously and it was quite easy to create a large string of data (a comma separated list) and export that to a text file (and create the text file if it didn't already exist). I could then easily append additional rows of data (records) to the text file. We want to build a questionnaire that will store the data locally on the computer in a text file. Each record may have a few hundred data points in a comma separated list.
View 8 RepliesI 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?
I'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 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 RepliesDoes AS3 write to an external text file? If so, how?
View 8 RepliesI have a simple mc which loads in a textfile consisting of a header and body. After editing, the file is overwritten and saved. All this works fine, only problem is, as soon as the "save file" is finished, and i reload it using one of the buttons, it doesnt get refreshed with the new data.[code]
View 1 RepliesI'm using flash and php to write or overwrite a text file (an xml file). I have text strings that contain the xml data, which then get parsed by the php file.
It works fine. However, I notice that the header in the XML file <?xml version='1.0' encoding='utf-8'?> get's replaced with <?xml version='1.0' encoding='utf-8'?>
Why would slashes get added?
[Code].....
I 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 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 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 will be creating a program to use for data entry. I'll be studying zebras in kenya and I won't have the internet there as I'm recording the data. I'd like to be able to send the data I generate in flash to an external text file. I understand I need some sort of script to do that, but is this something I can run just on my machine? (I'll probably make the data into xml format).
View 1 RepliesI have been struggling with this all week now. I am using as3 and within my movie I have a dynamic text box that contains a score.I need this score to be written to a text file preferbly in an array that only stores the highest 5 scores.I then need values from the array to be read and displayed on another movie which will act as a high score table. e.g. I will have a dynamic text box in my high score move that will display the 1st value in the array, and then the 2nd etc.
writing/reading data to text files.Alternatively if anyone else can suggest another method for a high score table please let me know. I only need a basic high score table that runs on a users local machine as the app i am making is desined to run on individual users machines.
I have successfully written my XML from flash to the server using php. But now I need to have it write to a Windows server using either asp or asp.net. Below is my code for PHP.Have searched allot of places and found how to write text files and lines inside text files.But I use a URL variable to write my XML file name out with xml data I created in Flash as3.For simplicty I am using localhost... but really is set to my web domain.On the address line I pass: Example
PHP CODE
<?phpif (isset($GLOBALS["HTTP_RAW_POST_DATA"])){ $data = $GLOBALS["HTTP_RAW_POST_DATA"]; $myFileName = $_GET['ClientFile']; chmod($myFileName, 0777); $fp = fopen($myFileName,
[code].....
I am trying to load a variable from data in a text file.I can read the text file fine but the variable data seemsonly to be available with in the function that reads it. I need to use the variable data outside of the function.This is the actionscript code i'm using.
var pathVars= new LoadVars();
pathVars.onLoad=function(ok) {
if(ok)
[code].....
I am trying to load a variable from data in a text file.I can read the text file fine but the variable data seems only to be available with in the function that reads it. I need to use the variable data outside of the function.
This is the actionscript code i'm using.
var pathVars= new LoadVars();
pathVars.onLoad=function(ok) {
if(ok)
{
[code]....
This is where the path_var becomes undefined
trace("This is outside the function... "+path_var);
pathVar1="This is outside the function... "+path_var;
I am trying to write one function to save all data but i am not sure how to change the name of each data value without writing them out one by one.[code]
View 3 RepliesI am creating e-learning material that will be accessedonline by students. Is there anyway that Flash can write to adatabase to tell us how long the student was logged in for and how
long there were on a page?
I've just been approached my current project needs to run from a CD and write data (bookmarking) to the hard drive. Been told the file will still launch from a html document and not AIR. Orginally had it built in AIR, no problem writing data. I remembered what I thought was a SharedObject but that does not sound right for writing out the data. Which is an xml file I am building from the student login.
Since I can't use AIR is there another function someone knows for writing a file to a location on the hard drive? Time is pressing on this one. I have to have an answer by morning.
This is an area of Flash I haven't experimented in, so I don't know where to start. Is it possible to run an SWF, and have Flash export variables externally, as the SWF is running? So for example, export an Array to XML? It doesn't need to be PHP, and stored serverside etc, just written locally on the computer would be fine.
View 4 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 a client that is running a 64 bit system. On my 32 bit system my Shared Object writes the data without a problem but theres hangs when the call is made to write the data. Any ideas how to go about solving this problem? I would think it would not matter if the system is 32 or 64.
View 1 RepliesI am creating an application that takes a user's hand signature, input on the Blackberry playbook. When the JPEG is created, I would like to add Exif data such as the date/time to the JPEG. Does anyone know how to do this, or if it is possible?
View 2 Replies