[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to write a text file with Actionscript

Posted on 2006-06-13
4
Medium Priority
?
747 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
[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
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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

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…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

656 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