User Tag List

Results 1 to 6 of 6

Thread: non repeating number?

  1. #1
    No Products Registered

    Join Date
    Apr 2011
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    non repeating number?

    Hi, are there any tuts on this?

  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: non repeating number?

    Can you describe what exactly you're after?

  3. #3
    No Products Registered

    Join Date
    Apr 2011
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: non repeating number?

    Hi David, I'm loving MMF2/TGF2 Can't wait to show my stuff when it's done!

    What I'm after:
    There's a target on stage, you click it, and, to add some dynamism and avoid boring the listener to death, I want that target to play one of 3 random audio samples (in no particular order).

    The audio is played only 3 times (since that's the amount of WAV samples I intend to include) and 3 times is also the chances it will take to change the displayed target to a new one.
    (and this new different target will also have 3 random sounds to be played -- also in no particular order-- every time it gets hit).

    AVAILABLE TARGETS:
    * target1
    audio samples available:
    target1wrong1.wav,
    target1wrong2.wav,
    target1wrong3.wav
    order to play WAVs this time: wrong3, wrong1, wrong2

    * target2
    audio samples available:
    target2wrong1, target2wrong2, target2wrong3
    order to play WAVs this time: 3, 2, 1

    etc


    (btw I'm deploying to Flash, so to avoid issues I'm not using extensions.)


    thanks David!

  4. #4
    No Products Registered

    Join Date
    Apr 2011
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: non repeating number?

    Maybe: Since I have 3 audio samples, create 6 lists of the possible playable order (6 is the factorial of 3), and have a random number generated from 1 to 6, and then assign the playing order depending on which number I got?

  5. #5
    No Products Registered

    Join Date
    Apr 2011
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: non repeating number?

    Maybe instead, since there are three "variab

  6. #6
    No Products Registered

    Join Date
    Dec 2008
    Location
    U.S.
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: non repeating number?

    Well, there are "better" ways to do it that having to hardcode in order and choose the list, but I think that hardcoding it is good in this circumstance because it'll probably be more efficient.

    Otherwise, just create an object to have a bunch of alterable values you can use as flags or something.

    When a sample is picked, change the corresponding flag to true or the value to 1. Simply add a condition that if the "flag" is 1, then pick another sample to play. Sorry if I'm not explaining ti too well.

Similar Threads

  1. Non Repeating Number Generating in IOS .
    By mhkc in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 19th January 2013, 03:51 PM
  2. Non Repeating Number Generating in IOS - Possible ??
    By mhkc in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 19th January 2013, 03:30 PM
  3. moving through a infinite self-repeating map
    By troshinsky in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th July 2011, 04:27 PM
  4. Repeating a frame.
    By kjellm87 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd May 2009, 04:11 PM
  5. No Repeating Names
    By SpineRaptor in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 20th March 2008, 03:37 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
  •