2 Replies Latest reply on Apr 28, 2008 6:13 AM by Witos_PL

    <img> tag

      Add a TextBox to the scene and name it: test_txt. Then add a following code to the first frame:
      test_txt.multiline = true;
      test_txt.wordWrap = true;
      test_txt.htmlText = "<img src = 'name.jpg'/>";

      Where 'name.jpg' is a file placed in the same directory as current ".fla" file. It works ok in Flash 9.0, but it doesn't in AIR 1.0 (picture doesn't show). I have written a quite big application in Flash, that shows html pages using TextField, and I want to convert it into AIR, but I don't want to change it. Any ideas? I would be grateful for any clues.
        • 1. Re: &lt;img&gt; tag
          That's because your AIR application is not running in the same location as your Fla ( this is the case both for running in ADL, and when your app has been published and installed fully). Create an assets folder and include this to be compiled into your AIR package.
          • 2. &lt;img&gt; tag
            Witos_PL Level 1
            Thanks. I've included the file "name.jpg" inside the package using Commands -> AIR Application and Installer Settings -> Include files, and installed the application - however it still doesn't work - when I start application using .exe file, picture doesn't show, but when I use nearby .swf file, it appears. File "name.jpg" has been copied properly.

            I tested it on a picture from the web too:
            test_txt.multiline = true;
            test_txt.wordWrap = true;
            test_txt.htmlText = "<img src = ' http://sp1.yt-thm-a01.yimg.com/image/25/f10/283004431'>";
            It works in .swf, but not from the air application.