How do I find file names with extension ogg

Get help using Construct 2

Post » Sat Nov 05, 2016 8:48 am

Hello, please, I have this program and I just want to add the name of list files with extension ".ogg".
The question is:
How to find out what file names have extension ogg ?.
What condition would have to use in the "for" bucle?

Image
B
30
S
13
G
21
Posts: 838
Reputation: 14,656

Post » Sat Nov 05, 2016 10:03 am

For loop..
Add another contition (System : Compare two values)
Code: Select all
 tokenat(NWjs.ListAt(loopindex),1,".")="ogg".....................List.. Add item NWjs.ListAt(loopindex)
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sat Nov 05, 2016 4:54 pm

korbaach wrote:For loop..
Add another contition (System : Compare two values)
Code: Select all
 tokenat(NWjs.ListAt(loopindex),1,".")="ogg".....................List.. Add item NWjs.ListAt(loopindex)


Ok I have it, thanks.
Please a last cuestion.
My application is for Android.
I want to get all file names that exist in the "FX" game folder when installed.
How I should specify the directory path ?.
What kind of path I should point?.
B
30
S
13
G
21
Posts: 838
Reputation: 14,656

Post » Sat Nov 05, 2016 9:10 pm

Mirlas wrote:My application is for Android.


with NW.js? :shock:

The NW.js object allows access to features specific to the NW.js exporter, such as reading and writing files to the local disk drive.
....
NW.js exports Linux, Mac OS X and Windows desktop apps.
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sat Nov 05, 2016 9:29 pm

Demons, then what choice do I have to read my audio files of my sound effects directory in android ?.
B
30
S
13
G
21
Posts: 838
Reputation: 14,656

Post » Sat Nov 05, 2016 9:39 pm

if you export with Cordova,I think that you need cordova-plugin-file
you can find plugins for C2.. here

Cordova File: read, write file, append file, remove file, copy file, move file, get directory entries and create directory.
[android, blackberry10, ios, windows8, wp8] [cordova cli] [xdk] [cocoon] [phonegap build service]



...but I may be wrong..so to find a second opinion before you buy anything.
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sun Nov 06, 2016 7:57 am

Ok, I will investigate to see if these plugins could help.
Thanks men.
B
30
S
13
G
21
Posts: 838
Reputation: 14,656


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 43 guests