[DIR MX] - list & text line ..

Ask a Question related to Macromedia Director Basics, Design and Development.

  1. #1

    Default [DIR MX] - list & text line ..

    i 'd create a list that count the number of lines in a textfield and keep
    the result :
    oldlist=[]

    textlisted = string (member("texte a lire field").text)


    linelist = the number of lines in textlisted

    repeat with i= 1 to linelist

    oldlist.add(i)

    end repeat

    put oldList



    so it gives a series of num : [1, 2, 3, 4]



    then i made a random function and create a newlist to keep results :

    so for newlist it gives : [2, 1, 4, 3] -- or an other order

    what i want now is changing the line order of my textfield to change the
    text; but i m loosing with comparison versus list and line (num)...

    any help to solve that please ?



    greenshot Guest

  2. Similar Questions and Discussions

    1. Multi-line TextBox - Paste text with numbered list, bullet list, tab character
      Hi All, I need a server control that's exactly like a multi-line TextBox, but also allow users to paste text with numbered list, bullet list, and...
    2. remove green line around list component
      How can I remove the green line around flash object like buttons, text fields and data component I have a list component that keep on displaying...
    3. text line spacing and line tool
      1.) Using InDesign 2.0.2 - When aligning text (in one particular text frame)to a base grid, the text will always skip one line even though the base...
    4. Can you make list boxes wrap text so information goes onto the next line?
      Can you make list boxes wrap text so information goes onto the next line? instead of keep going past the outside of the width of the box. cheers 4...
    5. list to line up 3d models
      hi, i am getting a error 'handler not found in object' this is the script, it a parent script and what i am trying to do line up the models by...
  3. #2

    Default Re: [DIR MX] - list & text line ..

    If I'm reading you correctly, you want to change the order of the lines
    of text in a text or field member based on a randomized number list. If
    that's the case then how about something like this:

    ----------
    on randomizeText theMemberName
    tempString = member(theMemberName).text
    thisLineCount = member(theMemberName).line.count
    repeat while thisLineCount > 0
    thisLine = random(thisLineCount)
    tempString2 = tempString2 & tempString.line[thisLine] & RETURN
    delete line thisLine of tempString
    thisLineCount = thisLineCount - 1
    end repeat
    lastLine = tempString2.line.count
    delete line lastLine of tempString2
    put tempString2
    -- or
    -- member(theMemberName).text = tempString2
    end

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    [url]http://www.ddg-designs.com[/url]
    412-243-9119

    [url]http://www.macromedia.com/software/trial/[/url]
    Rob Dillon Guest

  4. #3

    Default Re: [DIR MX] - list & text line ..

    thanks a lot it works fine ...


    greenshot Guest

  5. #4

    Default Re: [DIR MX] - list & text line ..

    ----------
    on randomizeText theMemberName
    tempString = member(theMemberName).text
    thisLineCount = member(theMemberName).line.count
    repeat while thisLineCount > 0
    thisLine = random(thisLineCount)
    tempString2 = tempString2 & tempString.line[thisLine] & RETURN
    delete line thisLine of tempString
    thisLineCount = thisLineCount - 1
    end repeat
    lastLine = tempString2.line.count
    delete line lastLine of tempString2
    put tempString2
    -- or
    -- member(theMemberName).text = tempString2
    end
    ************************************************** **************************
    ********
    i m also wondering if there is a way to make comparison between the old
    order -thisLineCount- and the new one
    indeed i would like the user click on the melt line to put it on the right
    place
    something to deal with "true" or "false" but i don t know how to compare
    that
    if newline = old line then alert "ok"

    .....



    "greenshot" <greenshot@wanadoo.fr> a écrit dans le message de news:
    bo0sg6$k32$1@forums.macromedia.com...
    > thanks a lot it works fine ...
    >
    >

    greenshot Guest

  6. #5

    Default Re: [DIR MX] - list & text line ..

    You will need to compare the string in line X of the original text to
    the string in line X of tempString2. To accomplish that you would need
    to make tempString2 a global variable so that you could access it from
    another function.

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    [url]http://www.ddg-designs.com[/url]
    412-243-9119

    [url]http://www.macromedia.com/software/trial/[/url]
    Rob Dillon 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