Solved

Create a text file

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Flash player plugin 13 7 346
Youtube video error 30 840
Video sharing with user login 3 215
How to determine issues pulling up internal device in browser. 5 96
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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. …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

756 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