flash/xml help

  • Started
  • Last post
  • 4 Responses
  • jpea

    soooo....
    i'm loading xml text data into a dynamic text field in a 'container' clip in flash, then duplicating that clip for however many xml entries are stated in the xml file. trouble is, one of the dynamic text fields in the MC has text that varies in length from one to the next. if i don't make the text field really tall, some pieces of text won't be fully visible, but if i make it short, the friggen text doesn't go multiline. this all screws up my spacing between the clips and such...
    anyone have any idea of a better way to go about this?

  • jpea0

    oh, and i tried autoSize = true and it's a no go

  • san_lee0

    Just make the txtfield 1 line in height and give it:
    myTextField.multiline=true;

  • jpea0

    thanks for the help san
    it still doesn't go multiline though... when i do autosize, the fields size to odd heights and don't take into account how long the text actually is, and the multiline statement doesn't do anything at all. tried 'em both and separately too.

  • unfittoprint0

    when "feeding" my flash file with external information I setup 3 actions after a sucessfull onLoad event:

    #1 parse the xml info to an array [you'll may use it after even when channg the XML/loadVars content]

    #2 create the stage, using attachMovie/createEmptyMovieClip...
    [if you intend to use dynamic textfields u mioght want to set those autoSize to "left" or true]

    #3 important: using the same array [or XML object] as before, recreate the same loop to align correctly your stage elements after a small interval.
    why? because Flash does not detect immediatelly the updated height of your MC's [with the textfields] so a small time lapse is needed [100 ms is more than enough] after "phase 2'. Don't foreget to clear the interval when the 'phase 3' begins.