[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to write a text file with Actionscript

Posted on 2006-06-13
4
Medium Priority
?
751 Views
Last Modified: 2010-07-27
I need to know how to write a text file using Actionscript without using a server.  This swf will run from a cd and must be able to write to the user's computer.
0
Comment
Question by:noir20754
4 Comments
 
LVL 37

Expert Comment

by:CyanBlue
ID: 16899001
Howdy...

You cannot do that with the SWF...  You will need to use third party projector tools such as Zinc or SWF Studio to create EXE file and then use that to create a text file...

CyanBlue
0
 
LVL 17

Expert Comment

by:Dushan De Silva
ID: 16899235
Sometimes this will not a efficient way.
Using getURL command call a external DOS BAT file with passing parameters to it.
eg: getURL("script1.bat parameter1 parameter2 parameter3)

Inside BAT file use $1, $2, $3 for capture parameter1, parameter2, parameter3 values.
Then inside bat file to write to external text file you can use

echo $1 "is parameter1" > textfile.txt
 echo $2 "is parameter2" >> textfile.txt
echo $3 "is parameter3" >> textfile.txt

likewise you can write.
If you want you can replace this BAT file with VB generated exe or some other language generated exe file.

BR Dushan
0
 

Author Comment

by:noir20754
ID: 16899701
Dushan911, I have tried your method and it seems like it should work, however there are two problems.  As typed, I cannot figure where you intend to close string and none of my guesses have been correct; please type the getURL command exactly.  Second, when I run it without sending any arguments, a box pops up asking me whether I wish to let the file run.  This is merely WIndows virus protection, but would be annoying and confusing to my end users.  Is there a way to avoid this (perhaps  by using fscommand)?
0
 
LVL 7

Accepted Solution

by:
Ramy_atef earned 2000 total points
ID: 16901994
Hi
You better use sharedObjects, it's so simple
I've made you a FLA file , download it from:

www.pylon-group.com/temp/sharedObjects.fla

write what u want in the text box then click on Save, then click on clear ( or even close the file then run it again ) , when u click on Load, it'll load what you wrote again

Rebards,
Ramy
0

Featured Post

Technology Partners: 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

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 have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
Suggested Courses

868 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