Welcome, Guest
Sign in
Create account
Home
Home Page
Components
Buy & Sell
Freelance
Marketplace
Tutorials
Flash Tutorials
Games
Free Online Games
Community
Message Board
Home
Help
Search
Login
Register
Subscribe to
Our Feed
Follow Us
On Google +
Follow Us
On Twitter
Become a fan
On Facebook
Flash-DB
»
The Library
»
old Versions of Flash
»
Flash MX
(Moderators:
vesa kortelainen
,
ShilohWarrior
,
Mohsin Sumar
,
Jorge Solis
,
Mattias Robo
,
bpat1434
) »
Import txt into TextField
« previous
next »
Print
Pages: [
1
]
Author
Topic: Import txt into TextField (Read 699 times)
stephen
Server what's that
Posts: 1
Import txt into TextField
«
on:
04/09/03, 13:39 »
I want to have two buttons, one that opens a file open dialog box that allows the user to choose a txt file and it then loads it into the textfield in the flash movie. And One other button that allows the user to save the contents of the textfield to a txt file. Is this possible?
Logged
Jorge Solis
Global Moderator
Systems Administrator
Posts: 14616
Re:Import txt into TextField
«
Reply #1 on:
04/10/03, 15:03 »
Sure is possible, but Flash can't do it by itself, need to use some backend script. Which language you use/support your server?
Jorge
Logged
Twitter
http://twitter.com/solisarg
JesseSanford
Server what's that
Posts: 12
Re:Import txt into TextField
«
Reply #2 on:
04/10/03, 15:52 »
The server is running php and mysql on apache... but what i need to know is if you can get a file open dialog box to popup via some actionscript and then once a file is selected to pass that files contents into the flash movie. Preferably without having to upload the file to the server first. I am guessing that getting access to the local hd from a non standalone swf file has some security issues and from what I can tell from my research it is only possible after publishing the swf to an .exe
-Stephen and Jesse
Logged
Jorge Solis
Global Moderator
Systems Administrator
Posts: 14616
Re:Import txt into TextField
«
Reply #3 on:
04/11/03, 02:11 »
The more accurate way of uploading a file from Flash is using an HTML pop-up. Anyway, using a non cross-platform code (only IE) you can simulate file uploading using JavaScript, see
http://www.flash-db.com/Board/index.php?board=18;action=display;threadid=3196
I don't see an easy task to load a file and display as text in a Flash Movie for a simply reason: the user can load any kind of file (nor only txt files, even if you try to validate) and if it's a txt file, with any king of format. Since Flash need a special format to read variables, you need to parse the file to output something like:
myText= .... here all the text in the file ...
Also parsing doble quotes and &
Jorge
Logged
Twitter
http://twitter.com/solisarg
Print
Pages: [
1
]
« previous
next »
Flash-DB
»
The Library
»
old Versions of Flash
»
Flash MX
(Moderators:
vesa kortelainen
,
ShilohWarrior
,
Mohsin Sumar
,
Jorge Solis
,
Mattias Robo
,
bpat1434
) »
Import txt into TextField