5 Replies Latest reply on Jun 27, 2008 5:00 PM by kglad

    Problem adding images to html text box.

    Gaz.T. Level 1
      This one, like a steering wheel down the trousers, is driving me nuts....

      Source can be downloaded where is says 'herehere' below (not used to this forum, seems a bit weird.)

      I have 2 text boxes on the stage, both are set to 'multiline' and set to render 'html'.
      they are also set to show the contents of the variables html1 and html2 respectively
      via the 'Var' field in the property window.(so this is an Actionscript 2 thing).

      the html I'm using is a very basic <img src /> tag.
      You can use any small image file you like to try this out, just change both source file names.
      (mine happened to be called bonkers.jpg, but gifs and pngs seem to be the same).

      When I define 'html1' directly, it works fine.
      If I define 'html2' directly it works fine,
      However if I define html2 via an array, although the content of both html1 and html2 both seems the same,
      (and all the trace code that follows checks this) the second html box doesn't work.

      It took me the best part of a day to figure out it was the process of transferring from an array
      that was causing the issue, but why ? What does an array do to a string that makes it stop working at html ?

      Any help would be much appreciated.
      Thanks
      Gaz



      here here