Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Media Player.

Author
Message
Not_Maindric
17
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 23rd Aug 2007 04:06 Edited at: 23rd Aug 2007 04:10
Ok, basically, I am new to Dark Basic, I already tested myself to the limit almost, and I am going to try and make a real program. It is going to be a media player, and I have a question or two...

First of all, how do I make DarkBASIC read a media file in a folder with-in the project folder, not me adding the file, but any user. If this is possible, I would like to know.

Also, if number one is possible, how do I make it display the name of the file?

Ok, I just remembered the second main reason I made this post. I plan on making this windowed, but how do I make the photos scale with the window?

Thanks to anyone who answer's my questions.

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 23rd Aug 2007 17:25
Sounds like you need to look at file access and windows in the help file

Your signature has been erased by a mod because it was rubbish.
Robert The Robot
18
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 23rd Aug 2007 18:37
Ok, number 1 is possible. Here's a little example I knocked up, hope it helps:



This will read the first 255 files in a folder that you can specify using the CD command. It prints the currently playing sound's , filename to screen.

I'm afraid I can't help on your second question, I've not really experimented with windowed applications in DB.

On our way 'ome, on our way 'ome...
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 23rd Aug 2007 19:57
@RTR
Your SLEEP 2000 at the end is unnecessary and there's a better way to do it.

this will halt the program until the sound is finished.

Your signature has been erased by a mod because it was rubbish.
Not_Maindric
17
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 23rd Aug 2007 23:54 Edited at: 24th Aug 2007 00:12
Alright, thank you. I will take a look at these, and see what I can make out of it.

After looking at the code you provided, it looked farely simple to make it so the listener selects what file types they want to play.. I am going to try my thought....

Login to post a reply

Server time is: 2025-05-30 13:36:34
Your offset time is: 2025-05-30 13:36:34