HTML file loading in Adobe Air + ProgressBar?

I am developing an AIR application. In that few reports I am showing. I am using HTML files to show the report.
Action script is preparing/Writing the report contents into a file/
I am using mx.controls.HTML to show the html file. Since the HTML file is little bigger in 512 MB RAM machine ( when I am running the air app)
its taking 95%cpu when the page is getting rendered for a long time. Its making other applications unresponsive.
Would it be possible to show progressbar when the HTML page is rendering?
Regards
Penugonda

i created a similar thread a few weeks back http://forums.adobe.com/thread/619411?tstart=30. I was doing research on this topic for a quite long now but sadly there is no direct way of monitoring the progress of an html loader, it does not offer any progressEvent.Progress to monitor either. and what is more sad is that they haven't done anything about in the latest release of AIR either
However all is not lost. What you can do is,monitor the progress of your URLRequest  using a URLLoader and once its complete you can use the (htmlloader object).loadString() function to render the html content loaded by the URLLoader :
var browser:HTMLLoader = new HTMLLoader();
var urlLoader:URLLoader = new URLLoader(new URLRequest("http://www.youtube.com/"));
urlLoader.addEventListener(Event.COMPLETE, onUrlLoaderComplete);
urlLoader.addEventListener(ProgressEvent.PROGRESS, onURLLoaderLoading);
private function onURLLoaderLoading(e:ProgressEvent):void
     trace("progress = ",Math.round((e.bytesLoaded/e.bytesTotal)*100));
private function onUrlLoaderComplete(e:Event):void
     browser.loadString(e.target.data);
cheers!

Similar Messages

  • ERROR: Module load completed but symbols could not be loaded for Adobe AIR.dll

    Does anyone know what causes this error? The application installed on my machine is using Adobe Air.dll version 2.0.3.13070
    This dump file has an exception of interest stored in it.
    The stored exception information can be accessed via .ecxr.
    (2b84.2908): Application hang - code cfffffff (first/second chance not available)
    eax=00000000 ebx=05105dbc ecx=0c013503 edx=00002b84 esi=77f15b70 edi=00000002
    eip=00a68972 esp=0012e03c ebp=00000000 iopl=0         nv up ei pl zr na pe nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00040246
    Unable to load image c:\Program Files\Common Files\Adobe AIR\Versions\1.0\Adobe AIR.dll, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for Adobe AIR.dll
    *** ERROR: Module load completed but symbols could not be loaded for Adobe AIR.dll
    Adobe_AIR+0x58972:
    00a68972 8bec            mov     ebp,esp

    Hi,
    Check weather its right path or not.Even check the call interface,weather you are giving the right one or not.
    Regards,
    Srikanth

  • Export to PDF defaults to HTML file instead of Adobe PDF since moving to CC2014

    Hi friends!
    Help please. Ever since I moved to CC2014 my InDesign and Illustrator is defaulting to HTML files instead of Adobe PDF when exporting to PDF. I also use this same software at another workplace and this has not been a problem there. I am on PC, on Windows 7. Does anybody know of a preference or such that I can switch to correct this?
    Any help will be greatly appreciated.
    Mindy.

    This is the window I am getting when attempting to use Data merge in ID. Have used this successfully before in previous versions of InDesign. Any ideas?
    Thanks

  • Refer to an object in Edge from an onclick="" in a .html file loaded into an iFrame in the animation

    HI, I am trying to figure out the Edge hierachies by stumbling my way through coding reference attempts. I've hit a wall...
    How can I refer to an object and a global function in my Edge animation from an onclick=""  located in an .html file loaded into an iFrame created within the master/parent Edge animation. Here's what I have...
    My main index.html is an Edge animation. One object <div> is a box created within Edge. I have added an iFrame with the Edge code:
    sym.$("MenuPanelScreen").html('<iframe src="list_images_cemetery.html" width="267" height="670" sandbox="allow-same-origin allow-scripts allow-top-navigation"></iframe>');
    That .html file which loads into the iframe within the animation contains thumbnails in <a> tags and contain onclick="" statements that should call a function within the Edge file.
    Eventually, I want the statements to read something like... onclick="changePic('Dragon.jpg', 'The Dragon', 'Saint and Worm')"
    However, I had no idea how to reference the changePic() function in the Edge animation. So, just to figure out how to reference the parent animation from an html in an iFrame, I change the onclick="" statements to...
    <a onclick="alert('Try to hide Nameplate'); sym.$('NamePlate_sym').hide();" >  <img src="gallery/TheyGaveUpTheirDead.jpg" width="80" alt="Angel and Worm" /></a>
    I first wanted to see if I could hide an Edge Symbol or div/element from the child html. I tried the following...
    onclick="alert('Try to hide Nameplate'); sym.$('NamePlate_sym', window.parent.document).hide();"
    I tried a few other variations that I won't bore you with. Can someone help me with the proper reference to effect an Edge element?
    Furthermore, I eventually wnat the onclick="" statement to reference a global function on attached to the Edge stage in the compositionReady event of the stage. The function is...
    window.changePic=function(myFileCurr, myLabelCurr, myDescriptionCurr) {
    alert("in changePick");
      document.getElementById("myImage").src="gallery/"+myFileCurr;
      document.getElementById("myImageLabel").innerHTML=myLabelCurr;
      document.getElementById("myImageDescr").innerHTML=myDescriptionCurr;
    I hope someone can point me in the right direction. Please forgive my ignorance. i am just getting back into coding and learning the intricacies of Jscript and jQuery. Thanks!

    Hi again Elaine,
    I actually had some success after many attempts with using your code. I can control the .stop() and .play() of the "NamePlate_sym" symbol. Yet, I am still having trouble doing anything else with it. I cannot .hide() it, nor use .html("Change text") on another element on the stage called"Rectangle". If I can accomplish that and all a global function on the stage, I'm in good shape.
    I placed the following script in the header of the .html file that gets loaded into the iFrame within the Edge composition:
      <script type="text/javascript">
       window.parent.AdobeEdge.bootstrapCallback(function(compId) {
       comp = window.parent.AdobeEdge.getComposition(compId).getStage();
       alert("CompID is "+compId);
       var symbol = document.createElement('div');
       symbol.innerHTML = 'Rotate';
       symbol.style.cssText = 'background-color:#fea; width: 50px; text-align: center;';
       symbol.style.cursor = 'pointer';
       symbol.onclick = function() {
        if (comp.getSymbol("NamePlate_sym").isPlaying()) {
         comp.getSymbol("NamePlate_sym").stop();
        else {
         comp.getSymbol("NamePlate_sym").play();
       window.parent.document.body.appendChild(symbol);
            </script>
    Once I put window.parent. in the first two lines of code and the last, my test worked. As I mentioned earlier though, I still can't get the syntax correct to .hide() an element (i.e. comp.getSymbol("NamePlate_sym").hide(); does not work), or more importantly, change the innerHTML value of an element on the stage. The code either does nothing or freezes.
    Thanks... Tommy

  • Javascript ajax loaded in adobe air

    Hello to all,
    I come on this forum because i meet a problem with AJAX and JAVASCRIPT.
    In my main script of ADOBE air, i load with "Ajax" the javascript contents but this javascript not execute not.
    All my functions are in the < head > only the calls are in the contents
    in charge of contents loaded with and the functions are called by onclick.
    That here is my  script for the forum, but is characteristic of my problem:
    <head>
    <script type="text/javascript">
    function getRequeteHttp() {
    ////the contents was supprimed for the example////
    function sendRequete(url) {
    ////the contents was supprimed for the example////
    function receiveReponse(requeteHttp) {
    if (requeteHttp.readyState==4) {
    (requeteHttp.status==200) {
    visibleReponse(requeteHttp.responseText);
    else {
    alert("error");
    function visibleReponse(rep) {
    document.getElementById("back2").innerHTML=rep;
    function action() {
    sendRequete('tryscript.html');
    function yiu(){
    alert('rooooooo');
    </script>
    </head>
    <body style="margin:0px;padding:0px;font-family:'Trebuchet MS';background:gray;" >
    <div>
    <input type="button" value="click" onclick="action();" />
    <div id="back2">
    <!--Contents loaded with ajax-->
    <input type="button" value="click2" onclick="yiu();" />
    <!---->
    </div>
    </div>
    </body>
    </html>
    Thank you for your assistants and forgiveness for my English

    Thank you for your answer,
    I'll go to read content's  links, once this made, i'll come back to explain my new situation.
    Cordially, thank you one more time.

  • Installation file (package) with adobe air sdk

    I made an installation file with adobe air (javascript, html via AIRSDK) ,
    but when it's packed and I run the file, it sends an error message "This application cannot be installed because this installer has been mis-configured. Please contact the application author for assistance."
    I don't know maybe I should try dreamviewer? because I'm sure about the codes
    I want to make such a file (as below image)
    but via airsdk it makes this:
    with air written on it

    try to update your air runtime. This is popular issue when developers use newer sdk but old runtime. Or include runtime to your app

  • Maximum file size for Adobe air for Androind and iOS compiled apps

    Hi All
    I am working on a project which has a few videos which I need to bundle into my mobile app for an Ipad app I am creating using Adobe Air for iOS. My question is simple is there a maximum file size limit on apps compiled using Adobe air for iOS? And if so what is it? Any help would be great.
    regards Mike

    Hi.  Im not a 100% sure this is correct.  I am able to make a large .IPA file (200+Mb) and it will go onto my iPad 1, but it does not work - Just quicts after a few secs.  If I run the same IPA on my iPad 2 it works.
    When I take out some of the assets so its a smalelr size then it does run on the iPad.

  • Pear to pear file sharing in Adobe Air

    hello frndz can anybody guides me how to make pear to pear file sharing in adobe flex air.
    is there any possibility for file sharing and text chat through p2p connection.
    Thanks and Regards
      Vineet Sharma

    One option is:
    1. Create a TestCase class that extends
    flexunit.framework.TestCase
    package my.package
    import flexunit.framework.TestCase;
    import flexunit.framework.TestSuite;
    public class MyTest extends TestCase
    public function MyTest(methodName:String=null)
    super(methodName);
    public static function suite():TestSuite {
    var ts:TestSuite = new TestSuite()
    ts.addTest(new FileTest("test"));
    return ts;
    public function test():void {
    assertTrue(true);
    2. Pass the class name to flex compiler using -includes
    argument
    -includes=my.package.MyTest
    You can add multiple classes separated by a comma.
    3. Then dynamically instantiate it in TestRunner
    var ts:TestSuite = new TestSuite();
    var Clazz:Object = getDefinitionByName("my.package.MyTest")
    as Class;
    ts.addTest(Clazz.suite());
    You can look for class names in a file and instantiate each
    one inside a loop if you have many classes.

  • Kindle Fire MIDI file play via Adobe Air

    Kindle Fire can play MIDI files via native Amazon MP3 player, but couldn't got it to play in Air (as an external file, checked with MP3, works fine, used same method to load .mid too), what can you suggest? I definitelly need .mid file to be played, not converted it in mp3 etc.
    Thanks in advance 

    Hi,
    Video encoding is very important.
    For example, use baseline profile level 3.1 for H264 for mobile
    (and not High profile level 4.1 recommended for desktop).
    For more information, see the MAX session of Fabio Sonnati:
    "Encoding for Performance on Multiple Devices"
    And if you have an Android phone/tablet, there is my AIR application
    to watch Adobe MAX 2011 videos :
    https://market.android.com/details?id=air.fr.inway.maxVideos2011
    Search "Sonnati" for this session's video.
    (For info, i use a video player based on OSMF 1.6)
    The pdf presentation is available on Sonmati's blog:
    http://sonnati.wordpress.com/
    Philippe

  • How to get remote file properties in Adobe AIR

    Hi Folks,
    I am developing a desktop application in AIR wherein we have a requirement for Live Update. I need a mechanism by which I can check the last modified date time of a file and if a new version is available, I need to download it.
    I am able to download the file from remote server. But the main issue is reading the last modified date time. Is there any way to get this information in AIR.
    Any help/suggestions would be highly appreciated.
    Thanks,
    Hitesh Patel (India)

    This depends on the type of server from which you are downloading the files. For example, if you are downloading the files from an HTTP server, and the server provides "Last-Modified" values in the HTTP response headers, you could use the following ActionScript code to determine those values:
    var urlReq:URLRequest = new URLRequest("http://www.example.com/");
    var urlStream:URLStream = new URLStream();
    urlStream.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, statusListener);
    urlStream.load(urlReq);
    private function statusListener(event:HTTPStatusEvent):void
        for each(var header:URLRequestHeader in event.responseHeaders)
            if(header.name == "Last-Modified")
                trace(header.value);

  • Newbie : what is .fpt file extension for adobe air ?

    Hi all the master,
    Hereby i have attached the printscreen of what i got from my client recently.
    I have already install the .air file, and it prompts to open the .fpt files. So i click on the fpt file. It loads halfway, and automatic close the whole application.
    As im a super newbie to AIR, may i know what is .fpt file extention to air ? and what kind of editor i must use to edit the content in the .fpt ?
    Hope to hear from all the master soon
    thanks
    C.K

    This looks VERY similar to a project I created for a client!
    The .fpt file, as Joe suggests, a custom file type created for the use by the Air app. It's probably just a re-labeled zip file to be honest! Probably contains the slides of the presentation as a guess??
    You shouldn't need to worry about the .fpt files. You should open them from within the Air app and not by opening them outside of the app - the OS might not recognise them unless the Air app has registered the .fpt extension upon it's own installation.
    Hope that helps.
    Dave.

  • Video File Conversion and Adobe AIR

    Hello guys
    I want to work on a simple app which will actually convert large size video files to small size video files. It will be a multiformat (and atleast supports .flv)
    But i have no idea where to start!
    I mean how to achive this file conversion thing.
    Any blog, library or resource will be highly appreciated appreciated
    Bunch of Thanks

    Thanks a lot for the reply
    I have not yet tried Alchemey, Is it available to download?
    Secondly, I want to do all the conversion locally, So MERAPI might be a good choice, Let me try it
    Thanks once again

  • Video Player In HTML Java Script Using ADOBE AIR

    I want a source code for a simple application which includes
    a video to run with no user interface required.
    I found most of the code in flex and flash so will appreciate
    any simple application code thank you.

    I think that you had a better chance to get a reply if you post in the appropriate forum (Flash, Premiere).  This is the Flash Player forum.

  • I need to check a value of variable which is in my php file in my adobe air application.

    please help

    The point of syncing is to have the same photos in albums as those on your computer. Being able to delete photos from a synced folder destroys the sync. If you want to be able to delete photos on your iPad then do not sync photos from your computer. Also the Photos app on an iPad is just one app. There are many other photo organizing and editing app in the App Store. Use the app the best suits your needs.

  • Incorrect functionality of Embedded tag in html page, displaying object on top of all layers of Adobe air application native window

    Title
    Incorrect functionality of embed tag in html loader for adobe air development
    Description
    Problem Description: If we had loaded youtube.com video url in a view stack and navigate to other index of stack or away from we UI screen within the same native window video or embeded tag of flash player or any other embed object will be displayed on top of all screens layer in same position of where the object should be placed in side of html loader only.
    Steps to Reproduce:
    1) go to http://get.straweb.com/StraWebBrowser/StraWebBrowser.air download and install
    2) load 2 tabs and in the 3 tab load video player of youtube.com which will a sample video
    before completing the load of 3 tab which trying to load video from youtube.com, navigate to other tabs 1 or 2 in few second once the flash player of youtube.com video player is load it will display in the current tab or UI screen.
    3) Try navigating to other tabs than youtube.com loaded tab you see the flash player is on top it stable.
    4) navigate to 3 tab and try to navigate to other tab you can observe that so how it will not show that flash player and only visible in that 3 tab which is fine.
    Actual Result: Embedded tag of html page displaying on top of all layers of Adobe air application native window
    Expected Result: Embedded tag of html page should only displayed in side htmlloader
    This you can replicate in any adobe air plugin update and on any Hardware and Environment.
    Applicable to all sdk versions of adobe air.

    Adobe Bugbase: Bug 3823839 Incorrect functionality of embed tag in html loader for adobe air development

Maybe you are looking for