User Tag List

Results 1 to 4 of 4

Thread: Calling a File

  1. #1
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Calling a File

    Let's say I have a file named "Map-1-8.ogg" and I want it to play when a counter equals anywhere between 1 or 8 and then I have a file named "Map-9-16.ogg" that plays when the counter equals between 9 to 16 and so on... How do I accomplish this?

    I'm pretty sure I need the file object and the string tokenizer object but I just can't work out in my head how to do it past that.

  2. #2
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Calling a File

    Nevermind, I figured it by accident.

  3. #3
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JimJam's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    340
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Calling a File

    Care to post a solution to this problem? If you post your solution, at least this topic will have some use to those who find it in the future.

  4. #4
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Calling a File

    Here's what I did.

    If start of frame
    Then Load filelist from Appdrive$+Appdir$+Game Path+"\Mapsong-*-*.*"

    If flag 0 is off
    Then start loop "map" List Nb Lines( "Map Tunes List" )+1 number of times.

    If on loop "map" and flag 0 is off
    Then set current line of filelist object to LoopIndex("map") and split FileName$( "File", List Select$( "Map Tunes List" )) string in string tokenizer object with delimiter "-"

    If on loop "map" and flag 0 is off and Latest Level >= Val(Element$( "String tokenizer", 1)) and Latest Level <= Val(Element$( "String tokenizer", 2))
    Then set alterable string A to Filelist object current selection.

    If alterable string A is different than alterable string B
    Then play Game Path+"\"+Alterable String A( "Map Values" ) and set alterable string B to alterable string A.

    If flag 0 is on
    Then turn off flag 0

    As I requested, this plays files such as "Mapsong-4-28.ogg" or IT or MID or whatever you want that MMF natively supports when the latest level variable is 4 to 28 or whatever you specified in the file name. My game's level sets can have a total of 999 levels due to name sorting problems I had to specifically fix. Let's just hope if my users make any levels, they don't have 999 map songs and map graphics because then it might get a little slow.

Similar Threads

  1. Calling A web Page
    By Kisguri in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 28th March 2011, 11:28 PM
  2. Calling a method
    By JoKa in forum SWF/Flash Export Module Version 2.0
    Replies: 6
    Last Post: 9th November 2010, 04:14 PM
  3. Calling you mathemagicians...
    By Asholay in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 10th December 2009, 11:12 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
  •