6 Replies Latest reply on Nov 3, 2006 2:34 AM by Quantainne

    AS fails to identify an image placed in html text via an img tag in a TextArea, while doing so correctly with textField.

    Quantainne
      A best-efforts session with identifying, in ActionScript, an image placed in a TextArea and identified with id, leads me to wonder whether the id attribute is supported.

      I have on disk a jpeg file of the amazom.com logo, a small image.

      In a scene, I have a TextArea with instance name TextAreaPane, and a Dynamic textField with instance name DynamicPane. Both of the html attributes in their properties panes are set to true. There is a button onstage with instance name "ShowIt".

      If my script reads:

      copyToShow = 'This is one place to see it: <img src="D:/Imgs/amazon.jpg" id="nineties"><br>'

      TextAreaPane.text = copyToShow;
      DynamicPane.htmlText = copyToShow;

      ShowIt.onPress = function( )
      {
      trace ("Via TextArea, I can identify: " + TextAreaPane.nineties);
      trace ("Via the textField, I can identify: " + DynamicPane.nineties);
      }

      After the movie loads both in the Player and in the Windows Projector, the image and text show correctly in both text panes. When I hit the button, I get:

      Via TextArea, I can identify: undefined
      Via the textField, I can identify: _level0.DynamicPane.nineties

      Hitting the button after the scene starts playing allows the very short asynchronous access time to elapse, so this isn't a case of loading a textfield in one line of script, and then in the next line expecting for ActionScript to have access to it.

      Of course for the Projector I send these statements to a textField on stage to see what trace gives me, and they're the same.

      I tried placing the two fields inside a movie clip (and adding that movie clip instance name to the head of their dot addresses), wondering if being a sub-object of a movie clip would help, but the same results -- the textField handles it, while TextArea doesn't.

      ... Does anyone have a means of getting better results?