Forum Topic: Creating .txt files (AS2)

(136 views • 7 replies)

This topic is 1 page long.

<< < > >>
None

mayoarm11

Reply To Post Reply & Quote

Posted at: 11/9/09 10:14 AM

mayoarm11 NEUTRAL LEVEL 17

Sign-Up: 06/13/07

Posts: 1,013

Hi. I'm using .txt files in my root directory for saving and loading data, using this awesome AS tut:
http://www.newgrounds.com/bbs/topic/2988 29

I was wondering if it's possible to CREATE and later edit the data in these files using AS2. Thanks in advance.

Awesome turret game in the making, featuring 85 uniqe turrets: News post

BBS Signature

None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 11/9/09 10:58 AM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 11,418

Why - no.

#ngprogramming at irc.freenode.net
haXe | Keel imperative | Spyro! | Thru you


None

mayoarm11

Reply To Post Reply & Quote

Posted at: 11/9/09 11:08 AM

mayoarm11 NEUTRAL LEVEL 17

Sign-Up: 06/13/07

Posts: 1,013

so it's only possible to read from txt files? that's it? not even edit its content?

Awesome turret game in the making, featuring 85 uniqe turrets: News post

BBS Signature

None

N5

Reply To Post Reply & Quote

Posted at: 11/9/09 11:12 AM

N5 NEUTRAL LEVEL 32

Sign-Up: 02/21/06

Posts: 28

Make a php script that makes a txt file. Then make you flash load that page in some way such as load vars.

<?php
//set up file access
$fp = fopen("newTxtFile.txt" , "x+");
//?open the text file
fputs($fp , "Text that will be saved in txt file once made");
//close the file
fclose($fp);
?>


None

mayoarm11

Reply To Post Reply & Quote

Posted at: 11/9/09 11:46 AM

mayoarm11 NEUTRAL LEVEL 17

Sign-Up: 06/13/07

Posts: 1,013

i dont really know php, where exactly can i enter that code, can it go in the flash file? If not, can I make a 'run script' file, that flash will run, something like, run:

domain.com/subfolder/createTxtFile.php

and furthermore, can I specify the name of the text file when running this file (it's probably wrong how I wrote this):

domain.com/subfolder/createTxtFile.php?n ame="text file name"

Awesome turret game in the making, featuring 85 uniqe turrets: News post

BBS Signature

None

Rustygames

Reply To Post Reply & Quote

Posted at: 11/9/09 11:57 AM

Rustygames LIGHT LEVEL 18

Sign-Up: 05/07/05

Posts: 6,661

That tutorial is 4 years old, just so you know

- Matt, Rustyarcade.com


None

mayoarm11

Reply To Post Reply & Quote

Posted at: 11/9/09 12:21 PM

mayoarm11 NEUTRAL LEVEL 17

Sign-Up: 06/13/07

Posts: 1,013

then care to direct me to a more advanced one, instead of acting like a snobby bitch?

Awesome turret game in the making, featuring 85 uniqe turrets: News post

BBS Signature

Misunderstood

Catpixels

Reply To Post Reply & Quote

Posted at: 11/11/09 05:53 AM

Catpixels NEUTRAL LEVEL 04

Sign-Up: 04/06/08

Posts: 30

From what I know it's not possible to create external files directly from Flash, due to safety restrictions imposed on the tool


All times are Eastern Standard Time (GMT -5) | Current Time: 07:09 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!