User Tag List

Results 1 to 5 of 5

Thread: Is there a way to call a sound from an expression?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,283
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Is there a way to call a sound from an expression?

    I am trying to play an external sound at runtime that gets its filename from a list. Is there an object that can do this? There is no option to use an expression in the Play Sample action that I can find.

  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)
    There is, but weirdly it's only possible by specifying a channel as well - "Play sample from a file on a specified channel" under the Sound object, or some wording like that. I'm not sure of the technical reasons behind it - if you're likely to be playing more than one at once, you might want to set up a mechanism to rotate across a few different channels.

  3. #3
    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)
    Oh, or you could use the Onu object, I think?

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,283
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    I just found Looki's SoundPlayer object on his site, but for the life of me I can't figure out how to use it. But I didn't even notice that the other Play Sample actions had a file component. Works exactly as planned. And yes, I needed to keep a var so every sample basically plays on a unique sound channel. Then reset the channel var to 0 when it exceeds 32.

    Cheers!

  5. #5
    Clicker Fusion 2.5 Developer
    SHINGEN's Avatar
    Join Date
    Apr 2015
    Location
    England
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do you use that extension i cant get it to play any sounds.. do i say play''00'' or ''00.ogg''?
    What am I doing wrong?

Similar Threads

  1. internal sound strings in expression editor
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 28th December 2016, 08:28 PM
  2. Playing sound files with an expression in Android
    By JeffMoore in forum Android Export Module 2.5
    Replies: 4
    Last Post: 28th February 2016, 08:26 PM
  3. Make a Call without "Call Phone" permission?!?
    By StingRay in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 21st April 2013, 09:35 AM

Posting Permissions

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