Dynamically loading names in batches

Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  1. #1

    Default Dynamically loading names in batches

    I have a small application that is supposed to load a list of names into 28
    dynamic text boxes on the stage. The list will gradually get larger, but the
    number of text boxes will always be the same. It starts with a simple LoadVars
    object and sets variables for the batches: currentBatch = 1; batchSize = 28;
    var myTxT = new LoadVars(); myTxt.onLoad = function(success) {
    //gotoAndStop('done'); gotoAndPlay('done'); }; myTxT.load('nametext.txt');
    The variables in the text file are all named 'n1, n2...', and so on. When the
    text loads, the file goes to a frame with this code in it to place it into the
    text boxes: start = currentBatch*batchSize-batchSize; for (i=start;
    i<=batchSize; i++) { _root['name_'+i].text = myTxT['n'+i]; } This all works
    fine loading the first 28 names. But I can't figure out how to add the next
    group of 28 names. I tried putting a 'next' button on the stage with the
    script, on (release) { _root.currentBatch = currentBatch++; } But this does
    not work. Any ideas what I'm doing wrong? For reference, my files are located
    at: [url]http://www.rabblerouser.com/clients/names.zip[/url] Any help is much appreciated!

    rabblerouser Guest

  2. Similar Questions and Discussions

    1. Dynamically loading xml content
      I?m creating a menu bar in which the links have to be dynamically created based on the values in the xml, and the number of links(buttons) may even...
    2. Loading images dynamically
      I have a slideshow that I am working on and the way the slideshow works is that it assigns any number of images i define to an array. problem is,...
    3. dynamically loading css-rules!
      what is the question, I dont get it, you said it print correctly the styles, so what's the problem ? Savut "Sindre Hiåsen" <paalhi@ifi.uio.no>...
    4. Getting the best answer(WAS: How do you dynamically assign array names?)
      I think this touches on an issue that people should consider when they post to this list. Often people ask a question, and instead of asking for...
    5. How do you dynamically assign array names?
      Hi, I am trying to initialize a dynamically-named array, i.e. with the following test code (if I type "script.pl char" at the command prompt) I...
  3. #2

    Default Dynamically loading names in batches

    I have a small application that is supposed to load a list of names into 28
    dynamic text boxes on the stage. The list will gradually get larger, but the
    number of text boxes will always be the same. It starts with a simple LoadVars
    object and sets variables for the batches: currentBatch = 1; batchSize = 28;
    var myTxT = new LoadVars(); myTxt.onLoad = function(success) {
    //gotoAndStop('done'); gotoAndPlay('done'); }; myTxT.load('nametext.txt');
    The variables in the text file are all named 'n1, n2...', and so on. When the
    text loads, the file goes to a frame with this code in it to place it into the
    text boxes: start = currentBatch*batchSize-batchSize; for (i=start;
    i<=batchSize; i++) { _root['name_'+i].text = myTxT['n'+i]; } This all works
    fine loading the first 28 names. But I can't figure out how to add the next
    group of 28 names. I tried putting a 'next' button on the stage with the
    script, on (release) { _root.currentBatch = currentBatch++; } But this does
    not work. Any ideas what I'm doing wrong? For reference, my files are located
    at: [url]http://www.rabblerouser.com/clients/names.zip[/url] Any help is much appreciated!

    rabblerouser Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139