Solved

Create a text file

Posted on 2004-03-25
1
294 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SWF won't scale? 4 532
How to disable  HTML5 video in chrome 2 1,595
Why is this simple, masked Flash animation flickering? 20 219
2012 Domain With 350 Machines All Running Windows 7 7 140
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

738 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