All of the questions are in there (as comments in red, mostly to do with how to shuffle), as well as comments to what each event does (in orange):
EDIT: If the link still doesn't work, use this:
http://www.freewebtown.com/rickygaming/Help.zip
Printable View
All of the questions are in there (as comments in red, mostly to do with how to shuffle), as well as comments to what each event does (in orange):
EDIT: If the link still doesn't work, use this:
http://www.freewebtown.com/rickygaming/Help.zip
The link is invalid. :o
^ Just in case you're all waiting to see a reply I put it on my website ^
There must be a better way to do this.
By the way, I want to make it so only music files are displayed. Is that possible without too much trouble?
(BUMP)
Could anyone help?
(BUMP)
I use music shuffling sometimes so a random music will play, maybe this code will help?
Use counter.
Always
-Set counter to 1+random(<total number of musics>)
and
Counter = 1
+No Music is Playing
-Play Music 1
That will get you a random music when you fire up your game.
It's not a game, its just a music player, but I will try it!
Did you get the mfa? I want to make sure you all understand what I'm after
It didn't work. Is there some way else to do this? Anyone got any better ways?
load the list of music files into a list object (their paths), then generate a random number based on the number of lines. Play the file of the number generated by loading the line in the list.
You could make it delete the line when played so you don't get any repeats in the shuffle similar to iTunes and many other players I'm sure...
I never thought of using a list! I'll get on this right away!
HOORAY! IT WORKS!
Now, I have one more thing... how do I get rid of the other files that aren't AUDIO files? I don't get how to use the quick token object (i dont even know if it would help), but could I possibly check during a loop maybe to see if the last 3 characters are anything but wav, mp3, mid, or something?
(especially because I don't want them to select a movie - it would look real funny cuz the Direct Show would get visible like its not supposed to)
THANK YOU ISAACBOY!!!!
Anyway, here's what I got so far:
EDIT:IGNORE THE COMMENTS
It didn't play my .mp3 for some reason
Um are you sure it wasn't m4a? Thats what Itunes uses
no it was mp3
You have an error in the play music events:
Appdrive$+Appdir$+"Music"+GetFullPath$( "Tree Control", GetIDFromText( "Tree Control", List Select$( "List" )))
should be
FileSelReturn$( "File" )+GetFullPath$( "Tree Control", GetIDFromText( "Tree Control", List Select$( "List" )))
Your most welcome...
I will have a think about the best way to approach the only playing audio files. I guess I would either use subtraction of right substring to check for extension or the string parser with "." as the delimiter to check for extension.
Maybe then running a loop and transferring anything that is of the correct extension to a new list which controls the shuffle?
Right, forgot to chang that - at first I had it so the tree control explored the appdrive$+Appdir$+"Music"Quote:
Originally Posted by Werbad
Sorry i was rushing - I had to get ready to go somewhere.
Dragonguy, was that what created the problem?
IssacBoy, thanks for your help. You don't have to worry that much about it, this is only to get me used to mmf2. (and to get me a music player that I can open faster :) )
Mostly I want it so when you load a folder into the list. Maybe on the loop to add list, there could be an Last three letters=mp3, wav, or mid somehow. Good idea using string parser, I'll look into that.
ini is the main thing I want to hide if it helps :)