User Tag List

Results 1 to 5 of 5

Thread: Loading text into an array

  1. #1
    No Products Registered

    Join Date
    Mar 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading text into an array

    I am trying to create a text based game for a primary school and would like to set up an array with 250 high frequency words, depending on the class depends on the words loaded. I am trying to use the Load array from File action at the start. What file format can I use as as an input file to get the words in?

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: Loading text into an array

    If you're using the array object the only file type you can use is MMF's own array format (ie. You'd have to create your own editor in MMF).

    You could use the "Dynamic Array" extension, which can load .csv text arrays (comma separated values), or one of the other objects - ini, list, easy-xml, etc.

    It really depends on *exactly* what data you need to store.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loading text into an array

    You could just type each set of words into a list and then use the save and load list file actions. Once the list was loaded, you could pull words out of the list at random.

    You could also type the words into a list and then use a loop to place them into the array object. You can then load and save them using the array's load and save actions.

    Depending on how you need to access the works, each method has its pros and cons.

    If you provide more information on what you need to do with the words, we could be more helpful.

    Steve

  4. #4
    No Products Registered

    Join Date
    Mar 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loading text into an array

    Thanks Steve, I have manually created an array now and load from a file at startup. I am trying to develop a game for a primary school where 10 words from a list of 200 float around the screen. I would like an audio file played of one of the words that they then have to shoot, points awarded or taken off then a question associated with that word displayed for a bonus. I was trying to use arrays because I thought I could associate the sound file, the question and the word in an array.
    I can do the graphical side but I am struggling to get the file name of the sample I require played.
    Am I going about this in the right way and any ideas on how I pass a variable to the play sample dialog box?

  5. #5
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Loading text into an array

    Using the array to associate the sound file, question, and word using an array sounds great. Without the code it's hard to answer your qustion. Could you post an example? It would seem that once the word is chosen, the number of the word in the array should allow you to choose the correct sound file to pass it on.

    Steve

Similar Threads

  1. Example of loading array data from a .csv file...
    By MuddyMole in forum File Archive
    Replies: 1
    Last Post: 12th November 2013, 05:38 PM
  2. Loading from array is just crashing
    By Konidias in forum Android Export Module Version 2.0
    Replies: 6
    Last Post: 25th March 2013, 05:06 PM
  3. Loading an Array
    By King_Cool in forum SWF/Flash Export Module Version 2.0
    Replies: 3
    Last Post: 4th December 2012, 07:10 AM
  4. Exception loading Array
    By K1kk0z90 in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 21st February 2012, 09:30 AM
  5. loading cnc array in c++ HELP??
    By firecraker180 in forum Extension Development
    Replies: 7
    Last Post: 13th November 2006, 08:11 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
  •