2 Replies Latest reply on Apr 10, 2012 12:46 AM by mlavie

    How to Make a Tagged XMLElement's Content Longer

    mlavie Level 1

      For IND 5.0, Actionscript



      Hi All,


      I have a situation in which I need to change the contents of a Tagged XMLElement. Then, I need to move the enclosing Text object to another frame.


      myXmlElement.contents = "Lorem ipsum" works fine if the new contents is no longer than the original contents. However, if the new contents is longer than the original contents, then the contents for the enclosing Text element only shows the last n characters of the contents, where "n" is the length of the original content.


      For example:


      if myXmlElement.contents equals "ABC", and I perform myXmlElement.contents = "12345678", then the Text contents becomes "678" (i.e., the last 3 characters, because the length of the original content was 3 characters).


      What am i doing wrong?