Solved

Create a text file

Posted on 2004-03-25
1
276 Views
Last Modified: 2010-04-03
Is there a way to create a text file and write data to that file from Flash?
0
Comment
Question by:bisonfur37
1 Comment
 
LVL 2

Accepted Solution

by:
SandyCooke earned 350 total points
ID: 10683372
Put this on a button:

myLoadVars = new LoadVars();
myLoadVars.variableOne = "This is the contents of the first variable";
myLoadVars.variableTwo = "This is the contents of the second variable";
myLoadVars.send("textfileMaker.php", myLoadVars, "POST");

Put this in a php file (called "textfileMaker.php") in the same directory as your swf:

<?php

$variableOne = $HTTP_POST_VARS['variableOne'];
$variableTwo = $HTTP_POST_VARS['variableTwo'];

$variableString = $variableOne.$variableTwo;

$myFile = fopen("myTextfile.txt","w");
fwrite($myFile , $variableString);
fclose($myFile);

?>

Sandy
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question