Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Playing external mp3's  (Read 762 times)

0 Members and 1 Guest are viewing this topic.
Playing external mp3's
« on: May 17, 2007, 08:51:14 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
someone help me please? I suck at getting external files to work right.
is there a way to play external mp3s apart from changing resources? I need a script that will:

for the step event:

first check for the file in the game's directory and then under \music
laod it up (or whatever)
if it isnt playing make it play
if it is exit
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.

Dayjo

shut the fuck up donny.
Re: Playing external mp3's
« Reply #1 on: May 17, 2007, 09:07:37 am »
  • hungry..
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3602
Well, you could do it like this;
Code: [Select]
fName = working_directory + "\Music\song.mp3";
if (file_exists(fName)){
  newSong = sound_add(fName,3,true);
  sound_play(newSong);
}


Or if you wanted you could load the file earlier on, perhaps put them into an array then you can check if it's playing too.
Logged
  • My Blog
Re: Playing external mp3's
« Reply #2 on: May 19, 2007, 10:26:56 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
thanks, it works well. much appreciated. :)
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.017 seconds with 43 queries.

anything