Solved

Create a text file

Posted on 2004-03-25
1
264 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

947 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now