1 Reply Latest reply on Jun 28, 2011 9:00 AM by Joe ... Ward

    StageWebView() constructor


      I am trying to create an object of the StageWebView()


      var stageview = new window.runtime.flash.media.StageWebView();


      Im getting the error:


      TypeError: Results of expression 'window.runtime.flash.media.StageWebView' [] is not a constructor.


      I'm guessing this is because the object StageWebView does not exist.


      I have Adobe AIR 2.7 installed. When I generate a preview build through Dreamweaver my useragent string says I am running 2.0.2, but when I compile a build it says my version is 2.7.


      Either way I can't create a StageWebView object.


      Any ideas?

        • 1. Re: StageWebView() constructor
          Joe ... Ward Level 4

          Well, first of all, why create a StageWebView object on the desktop, in an HTML-based AIR app?


          But as to the error, it sounds like Dreamweaver is using the AIR 2.02 version of the SDK. The StageWebView class is only available in AIR 2.5+. This is why it won't work when previewing. At runtime, it probably doesn't work because Dreamweaver is undoubtedly setting the namespace to AIR 2 as well, which controls the APIs that are available even when running under a newer runtime. You can try finding and editing the application descriptor manually to set the namespace version to 2.7 (but I'm unsure whether or not Dreamweaver will fight you here).