User Tag List

Results 1 to 3 of 3

Thread: loading and playing a random file

  1. #1
    No Products Registered

    Join Date
    Aug 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    loading and playing a random file

    Is there a way I can get a MMF2 application, while running, to fish around in a folder, select a file, then play it?

    I'm talking about music files here, like .mp3's.

    Basically, the way it's supposed to work is that the user, by means of the the "Explorer object" fish around until you locate the folder you want.

    Then, at random intervals, the application will pick a song from this folder and play it. When it's done, it'll pick another song and play that, etc.

    Any ideas on how I could code this?

    Thanks.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: loading and playing a random file

    I'm not sure of the details of the file objects to use, but you'd have to use the dialog object to allow the user to select a folder, then get the list of available files from the object and add those that were playable (the ones that have the .mp3 extension, for example) into a List object.

    After that it's just a matter of selecting a random line from the list object and playing the file that's contained in the line (with the "Play file on a specific channel" action of the internal sound object).

    There isn't an MP3 extension for MMF2 yet, but similar sound files should be playable in this way.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: loading and playing a random file

    Quote Originally Posted by DavidN
    There isn't an MP3 extension for MMF2 yet, but similar sound files should be playable in this way.
    You should be able to play MP3s through the DirectShow object.
    .:::.Joshtek.:::.

Similar Threads

  1. Playing with random sample frequency
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 8th July 2008, 04:52 PM
  2. Playing/loading Mp3/jpg files via vitalize?
    By DJ_Wild in forum Vitalize
    Replies: 6
    Last Post: 20th March 2008, 12:33 PM
  3. Playing Random Animation
    By mussashimits in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 19th July 2007, 10:00 PM
  4. Random Sample not playing
    By mussashimits in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st June 2007, 08:29 PM
  5. playing a Random Sample- possible?
    By mussashimits in forum The Games Factory 2 - Technical Support
    Replies: 12
    Last Post: 15th April 2007, 11:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •