Admiral Refuge Posted March 26, 2011 Share Posted March 26, 2011 @erkro1:> Now getting this error :> musicCache(i) = error..Are you using the latest version of Origins? Only replace that if your version is using the cache (check if the code above it is using "frmEditor_MapProperties.lstMusic.AddItem strLoad" or not; if it is, use the older version). Link to comment Share on other sites More sharing options...
erkro1 Posted March 26, 2011 Share Posted March 26, 2011 @Anŧhøñy:> Are you using the latest version of Origins? Only replace that if your version is using the cache (check if the code above it is using "frmEditor_MapProperties.lstMusic.AddItem strLoad" or not; if it is, use the older version).I'm using EO v2 Beta..And its using frmEditor_MapProperties.lstMusic.AddItem strLoad Link to comment Share on other sites More sharing options...
Admiral Refuge Posted March 26, 2011 Share Posted March 26, 2011 @erkro1:> I'm using EO v2 Beta..> And its using frmEditor_MapProperties.lstMusic.AddItem strLoadOkay, I think it's better if I clarify.When looking in your PopulateLists sub, if you see:```' music in map properties frmEditor_MapProperties.lstMusic.Clear frmEditor_MapProperties.lstMusic.AddItem "None." strLoad = Dir(App.Path & MUSIC_PATH & "*.mid") Do While strLoad > vbNullString frmEditor_MapProperties.lstMusic.AddItem strLoad strLoad = Dir Loop```Then use this code:``` strLoad = Dir(App.Path & MUSIC_PATH & "*.mp3") Do While strLoad > vbNullString frmEditor_MapProperties.lstMusic.AddItem strLoad strLoad = Dir Loop```If you see:``` strLoad = Dir(App.Path & MUSIC_PATH & "*.mid") Do While strLoad > vbNullString ReDim Preserve musicCache(1 To i) As String musicCache(i) = strLoad strLoad = Dir i = i + 1 Loop```Then use this code:``` strLoad = Dir(App.Path & MUSIC_PATH & "*.mp3") Do While strLoad > vbNullString ReDim Preserve musicCache(1 To i) As String musicCache(i) = strLoad strLoad = Dir i = i + 1 Loop``` Link to comment Share on other sites More sharing options...
Broojo02 Posted March 30, 2011 Share Posted March 30, 2011 It doesn't give me any errors or anything but the music doesn't play :( It shows up n the list fine but when you try to preview it with the play button or listen on the map nothing happens. Link to comment Share on other sites More sharing options...
Markz88 Posted April 3, 2011 Share Posted April 3, 2011 There is a bug!If we have a map with a midi music and a one with mp3 music, when we are in the midi map and we warp to the mp3 map, the midi music never stop… same for the reverse.. how to resolve it? Link to comment Share on other sites More sharing options...
MLB Posted April 4, 2011 Share Posted April 4, 2011 @Markz88:> There is a bug!> If we have a map with a midi music and a one with mp3 music, when we are in the midi map and we warp to the mp3 map, the midi music never stop… same for the reverse.. how to resolve it?Only use either mp3s or midis, then. :3 Link to comment Share on other sites More sharing options...
damian666 Posted April 4, 2011 Author Share Posted April 4, 2011 yeah, which is the whole point for this xdDami Link to comment Share on other sites More sharing options...
erkro1 Posted April 4, 2011 Share Posted April 4, 2011 @Admiral:> Okay, I think it's better if I clarify.> When looking in your PopulateLists sub, if you see:> ```> ' music in map properties> frmEditor_MapProperties.lstMusic.Clear> frmEditor_MapProperties.lstMusic.AddItem "None."> strLoad = Dir(App.Path & MUSIC_PATH & "*.mid")> Do While strLoad > vbNullString> frmEditor_MapProperties.lstMusic.AddItem strLoad> strLoad = Dir> Loop> > ```Then use this code:> ```> strLoad = Dir(App.Path & MUSIC_PATH & "*.mp3")> Do While strLoad > vbNullString> frmEditor_MapProperties.lstMusic.AddItem strLoad> strLoad = Dir> Loop> > ```> If you see:> ```> strLoad = Dir(App.Path & MUSIC_PATH & "*.mid")> Do While strLoad > vbNullString> ReDim Preserve musicCache(1 To i) As String> musicCache(i) = strLoad> strLoad = Dir> i = i + 1> Loop> > ```Then use this code:> ```> strLoad = Dir(App.Path & MUSIC_PATH & "*.mp3")> Do While strLoad > vbNullString> ReDim Preserve musicCache(1 To i) As String> musicCache(i) = strLoad> strLoad = Dir> i = i + 1> Loop> > ```-woet-Thanks it works :D Link to comment Share on other sites More sharing options...
MLB Posted April 4, 2011 Share Posted April 4, 2011 disregard this i was just being silly Link to comment Share on other sites More sharing options...
EisKeks Posted April 5, 2011 Share Posted April 5, 2011 Ok i got all in but i got a problem it don't want to play my mp3 music its listed in properties but when i push play i dont wanna play it.Im using 2.0these are my codes```Public Sub PopulateLists()Dim strLoad As String, i As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ' Cache music list strLoad = Dir(App.Path & MUSIC_PATH & "*.mid") i = 1 Do While strLoad > vbNullString ReDim Preserve musicCache(1 To i) As String musicCache(i) = strLoad strLoad = Dir i = i + 1 Loop strLoad = Dir(App.Path & MUSIC_PATH & "*.mp3") i = i Do While strLoad > vbNullString ReDim Preserve musicCache(1 To i) As String musicCache(i) = strLoad strLoad = Dir i = i + 1 Loop```and second``` ' Calculate fps If TickFPS < Tick Then GameFPS = FPS TickFPS = Tick + 1000 FPS = 0 Else FPS = FPS + 1 End If 'loop mapmusic if needed and its a mp3 file LoopMp3 Loop```so whats worng ò.O Link to comment Share on other sites More sharing options...
Iann Posted April 5, 2011 Share Posted April 5, 2011 Code Very Good Link to comment Share on other sites More sharing options...
EisKeks Posted April 6, 2011 Share Posted April 6, 2011 ya but it dont works should i change something in the sound modul because i cant play the mp3's they are only availeble in the musik. Link to comment Share on other sites More sharing options...
EisKeks Posted April 12, 2011 Share Posted April 12, 2011 ok i still got no sound if i want to play my mp3\. I dont know why :/ i habe done all here in the thread but nothing is working :/i hope some one got an idea to help me.(must it be on server and client side or only on client side?) Link to comment Share on other sites More sharing options...
Xlar Posted April 30, 2011 Share Posted April 30, 2011 Yes, I also have done everything as well, yet I can't seem to get the mp3 file to playing as the main menu music. Nor does it appear in the map music list Link to comment Share on other sites More sharing options...
gdog12356 Posted May 3, 2011 Share Posted May 3, 2011 it works fine, you just messed up the code. My problem is that it doesn't play automatically. Link to comment Share on other sites More sharing options...
SilentKillzr Posted May 4, 2011 Share Posted May 4, 2011 > I have everything working except the class wont seem to play any mp3\. It shoots a "Object doesnt support this action. Runtime error '445' and then selects the line:> If CLng(m_objMediaPosition.CurrentPosition) = CLng(m_objMediaPosition.Duration) Then> inside of the public Playmp3 function.Scratch that, apparently the mp3's i was using were formatted differently, tried different files, and works nice. Thanks! Link to comment Share on other sites More sharing options...
terence469 Posted May 12, 2011 Share Posted May 12, 2011 Oh my goodness Damian! Thank you so much for your contribution! I nearly gave up just because of this issue. (: Works great!! Link to comment Share on other sites More sharing options...
EclipseCommunity Posted May 19, 2011 Share Posted May 19, 2011 Works sweet, even for menu music. Thanks. Link to comment Share on other sites More sharing options...
Peter112 Posted August 3, 2011 Share Posted August 3, 2011 Now in modGeneral, in Public sub PopulateLists, look for :Code: [Select]' music in map properties frmEditor_MapProperties.lstMusic.Clear frmEditor_MapProperties.lstMusic.AddItem "None." strLoad = Dir(App.Path & MUSIC_PATH & "*.mid") Do While strLoad > vbNullString frmEditor_MapProperties.lstMusic.AddItem strLoad strLoad = Dir LoopI just only find the half of the code so I paste the missing part and everything is work fine O.o Link to comment Share on other sites More sharing options...
SpiceyWolf Posted August 3, 2011 Share Posted August 3, 2011 lol nice tutorial Dx wish i could add it but ive practically added to every form and mod so i cant really replace anything without messing SOMETHING up XD Link to comment Share on other sites More sharing options...
Medleyy Posted August 3, 2011 Share Posted August 3, 2011 ![](http://www.planetcalypsoforum.com/gallery/files/6/7/3/HolyNecroPost_759032.jpg) Link to comment Share on other sites More sharing options...
RyokuHasu Posted August 4, 2011 Share Posted August 4, 2011 Necroposting doesn't really matter in the tutorial section… but it would be nice if it wasn't such a Spam/Kiss-Ass post =P Link to comment Share on other sites More sharing options...
SpiceyWolf Posted August 28, 2011 Share Posted August 28, 2011 I keep getting User Type not Defined on this line of code in DX ShowPrivate m_objBasicAudio As IBasicAudioI looked through all the chat on the topic but no one else seems to have this problem, what could be my mistake? Link to comment Share on other sites More sharing options...
Robin Posted August 28, 2011 Share Posted August 28, 2011 This tutorial is terrible, don't use it.Rip the music system from CS:DE. Link to comment Share on other sites More sharing options...
SpiceyWolf Posted August 28, 2011 Share Posted August 28, 2011 uhhhh…. ok..? o.o thanks robin! im glad i have ur permission to use it :P Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now