3 Replies Latest reply on Sep 23, 2008 10:29 AM by Aaron N

    img Tag in textfield adobe air problem help :(

    Hope1983
      Hi there,
      i ve got a textfield on the stage and wanted to give it a img tag.
      If i am using flash 9 in publishing, it is no problem.
      if i change to adobe air. There is no img in the textfield.

      Is this a bug???
        • 1. Re: img Tag in textfield adobe air problem help :(
          Oliver Goldman Adobe Employee
          Are you using a relative or absolute URL for the image? If it's relative, keep in mind that the base URL is different in the two cases.

          • 2. Re: img Tag in textfield adobe air problem help :(
            Hope1983 Level 1
            hi thx for your answer.

            I've tested both. Also i have created an image in my fla and give it a classname/ id .
            Then i call it like that <img src = "myimg" ></img>
            In Flash9 no Problem. In Adobe air .. no image is shown.
            • 3. Re: img Tag in textfield adobe air problem help :(
              Aaron N
              I've had the same problem. Using an img tag in a dynamically generated text field does not work the same published for AIR as it does published for Flash Player. If I use a relative path for the image or the class name of a symbol in the library in Flash it works perfectly, but neither work if the same code is published for AIR. Is there a solution to this that anyone knows of?

              Here's an example:

              var optionFont:Font = new UniversBold();

              var optionFormat = new TextFormat();
              optionFormat.color = 0x27318b;
              optionFormat.bold = true;
              optionFormat.size = 38;
              optionFormat.font = optionFont.fontName;

              var field:TextField = new TextField();
              field.embedFonts = true;
              field.autoSize = TextFieldAutoSize.LEFT;
              field.defaultTextFormat = optionFormat;
              field.selectable = false;
              field.htmlText = "Hi There <img src='GTE38'> Hi There";
              field.wordWrap = true;
              field.width = 200;
              addChild( field );


              UniversBold and GTE38 are classes in the library. This works when published for Flash, but if republished for AIR, the image does not show up.