5 Replies Latest reply on Jun 3, 2008 12:51 PM by voxmundy

    newbie question

    voxmundy
      I have been creating an application using actionScript 3 and compiling it as an air 1.0 file. The actionscript works fine until I put in the following line:
      var html:HTMLLoader
      then I get a blank page with now errors.
      I know what you are about to say... and yes I did import the HTMLLoader class:
      import flash.html.HTMLLoader;
      My ultimate question is, is there any way to have HTMLLoader content in an air application (written in actionScript 3) as a window placed on the stage and controlled by the flash.

      Sorry if this seems like and obvious question.

      Thanks,

      J
        • 1. Re: newbie question
          Joe ... Ward Level 4
          To add an HTMLLoader to your window, you must do something like:

          var html:HTMLLoader = new HTMLLoader();
          stage.addChild(html);

          THe HTMLLoader object is a display object (not a window) and can be treated like any other Flash display object in most respects. (Scaling isn't recommended and will prevent embedded SWF and PDF content from being displayed by the HTMLLoader.)
          • 2. Re: newbie question
            voxmundy Level 1
            Thanks for the quick reply Joe.
            My problem is unusual I feel, unless I don't have the concept right. It seems that I can place the HTMLLoader content to the stage but everything else created with actionscript does not appear. I can either have my flash navigation appear or the HTMLLoader content but not both. As a matter of fact just casting a variable as HTMLoader gives me a blank screen, with out even adding any thing to the DisplayObject.
            I can't figure it out so I may have to come up with a multiple window scenario and figure out how to get them to talk to one another. Not ideal... but it may work.

            Thanks,

            J
            • 3. Re: newbie question
              Joe ... Ward Level 4
              This really sounds like a configuration problem with your development tool, your AIR project, or how you are testing your application.
              • 4. Re: newbie question
                voxmundy Level 1
                That is something I haven't explored. I just installed the air update for flash cs3, but I also have flex builder3. Do I need the sdk to test these then??

                Thanks,

                J
                • 5. Re: newbie question
                  voxmundy Level 1
                  Joe,
                  After uninstalling flash player and air and reinstalling them with the cs update I now get an output at least. The error is as follows:
                  6:coerce flash.html::HTMLLoader
                  VerifyError: Error #1014: Class flash.html::HTMLLoader could not be found.
                  I have imported it like so:
                  import flash.html.HTMLLoader;
                  how can I tell if I have that class??

                  Jeff