Forum Topic: File name arrays?

(82 views • 12 replies)

This topic is 1 page long.

<< < > >>
None

Yambanshee

Reply To Post Reply & Quote

Posted at: 9/28/09 01:15 PM

Yambanshee DARK LEVEL 11

Sign-Up: 10/05/08

Posts: 1,608

Well i posted this on the programming forum, but they didint have a clue, so i was wondering if any of you know of a way to either:

rename every file in a folder to 1, 2, 3 etc...
get an array of all the files inside a folder to be put into flash as an array

ANY help would be great, and i cant use AIR cuz im on flash 8

AS2||AS3||Motox
Thanks to hdxmike for the sig :]

BBS Signature

None

UnknownFury

Reply To Post Reply & Quote

Posted at: 9/28/09 01:33 PM

UnknownFury EVIL LEVEL 26

Sign-Up: 08/10/05

Posts: 6,027

Why would you want to actually rename the files? What's wrong with leaving the filenames as they are and loading them in?

Portfolio(Under construction): UnknownFury.com |
Msn: giant_ak_47@msn.com | Contact: me@unknownfury.com
Follow me on twitter!


None

Yambanshee

Reply To Post Reply & Quote

Posted at: 9/28/09 02:05 PM

Yambanshee DARK LEVEL 11

Sign-Up: 10/05/08

Posts: 1,608

im making a mp3 player that i want any mp3 files to be copyed into a folder. problem is this is my loading script:
sound.loadSound("Music/"+songNum+".mp3", false);

As you can see i need somekind of variable to load the specific name. Either in a array or a number will work perfectly

AS2||AS3||Motox
Thanks to hdxmike for the sig :]

BBS Signature

None

Yambanshee

Reply To Post Reply & Quote

Posted at: 9/29/09 10:24 AM

Yambanshee DARK LEVEL 11

Sign-Up: 10/05/08

Posts: 1,608

does anyone have any suggestions?

AS2||AS3||Motox
Thanks to hdxmike for the sig :]

BBS Signature

None

LeechmasterB

Reply To Post Reply & Quote

Posted at: 9/29/09 10:35 AM

LeechmasterB EVIL LEVEL 16

Sign-Up: 04/01/05

Posts: 942

This shouldn't be possible with flash alone due to sandbox restrictions. And i don't mean the changing filenames (that will not be possible anyhow) but even reading unknown files. With flash 8 there are even less options then with a newer version...

You could simply put the files into a folder by hand and modify a text file or xml file to keep the filenames. Then you load the text/xml file with the filenames and read them and load the mp3s according to that.


None

Yambanshee

Reply To Post Reply & Quote

Posted at: 9/29/09 10:49 AM

Yambanshee DARK LEVEL 11

Sign-Up: 10/05/08

Posts: 1,608

At 9/29/09 10:35 AM, LeechmasterB wrote: This shouldn't be possible with flash alone due to sandbox restrictions.

Good suggestion with the text-box. Another question though, do you know of any programming languages that can store something like file names into a text box so that i can load them into flash? or will it have to be done manually?

AS2||AS3||Motox
Thanks to hdxmike for the sig :]

BBS Signature

None

LeechmasterB

Reply To Post Reply & Quote

Posted at: 9/29/09 11:03 AM

LeechmasterB EVIL LEVEL 16

Sign-Up: 04/01/05

Posts: 942

You can either write down the song names and paths manually or create a program that creates the file for you automatically in some other programming language.


None

Yambanshee

Reply To Post Reply & Quote

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

Yambanshee DARK LEVEL 11

Sign-Up: 10/05/08

Posts: 1,608

At 9/29/09 11:03 AM, LeechmasterB wrote: or create a program that creates the file for you automatically in some other programming language.

that was sort of my question, do you know of any such language?

AS2||AS3||Motox
Thanks to hdxmike for the sig :]

BBS Signature

None

Jin

Reply To Post Reply & Quote

Posted at: 9/29/09 11:16 AM

Jin LIGHT LEVEL 30

Sign-Up: 09/09/06

Posts: 1,934

You asked this already, and got a perfect answer.

BBS Signature

None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 9/29/09 11:24 AM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 11,432

You don't need Flash CS3 to use AIR. As always, Flex is free.

In order to communicate to a program capable of manipulating files, you need either a wrapper (a program to embed the Player like for example a browser does) or to convert your app to a projector and call a program from that.

To do the first, you use either AIR or haXe's SWHX or some other shareware shit. They're both extremely simple.
To do the second, you have to be gay. Just make a separate program to do the file manipulation.

What language to use? Any fucking language ever. Unless you're on Windows your computer should already have a dozen compilers, otherwise download a C one of a few megabytes.

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


None

hdxmike

Reply To Post Reply & Quote

Posted at: 9/29/09 11:34 AM

hdxmike LIGHT LEVEL 09

Sign-Up: 09/11/09

Posts: 1,843

Use some XML file or buy MDM zinc 3.0 it far expands the possibilities of your flash
but flash alone and its going to be difficult if not impossible

OOP AS3 || Flash 8,CS3,CS4 || *sigh* || The new forum on the block : FLASH SEED !

BBS Signature

None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 9/29/09 11:49 AM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 11,432

At 9/29/09 11:34 AM, hdxmike wrote: Use some XML file or buy MDM zinc 3.0 it far expands the possibilities of your flash
but flash alone and its going to be difficult if not impossible

XML has nothing to do with it. Don't use words you don't understand.
Zinc is of the shareware shit I was referring to.
Flash purposely prevents you from doing this. That's the reason of the thread.

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


None

Yambanshee

Reply To Post Reply & Quote

Posted at: 9/29/09 11:51 AM

Yambanshee DARK LEVEL 11

Sign-Up: 10/05/08

Posts: 1,608

thanx gust, im reading up on haxe right now.

AS2||AS3||Motox
Thanks to hdxmike for the sig :]

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 03:50 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!