Adobe Flex - load Never complete problem

Posted on 2009-04-15
Last Modified: 2012-05-06

In my Flex Application, i'm using a IFrame and a button.
In IFrame i'm pasisng a URL and it displays that URL. on Clicking next button, it takes to next URL in the IFrame.

When i click on next button, I'm getting error:
error #2044: Unhandled IOErrorEvent:.  text=Error #2036: Load Never Completed

It seems that load of first Iframe didn't completed on clicking next Button and i get this error.

Could you please suggest any suitable solution  for this, either to completely remove this error or to just avoid the PopUp message .

Please suggest as this is very urgent in my project.

Thanks and Regards
Question by:PuneetKSaxena
    LVL 20

    Expert Comment

    Are you "embedding" an Iframe in your Flex applictaion and the Button is a Flex button? At the moment it sounds as if this question would fit much better in a HTML or JavaScript zone.

    Author Comment


    Yes. This is complete Flex Application which contains Iframe and Button.

    LVL 20

    Expert Comment

    This approach does nothing else than to use the Flex Externalinterface to make the browser create an IFrame and position it to fit the position and size of the virtual component in the flex application. As soon as this component is resized, moved, shown or hidden, these changes are relayed to the IFrame by usinf ActionScript to execute JavaScript in the page which then changes the Iframe.

    I have no Idea of how your component is working in detail, but the message you are writing about lets me assume that it takes quite some control over a lot of features of the IFrame. Unfortunately it seems to be not that perfekt.

    You could try using, [parameter1:Object])
    To call a JavaScript function in your HTML page which does the url-changing for you instead of the flex component. You would sort of short-circut the component, but you would also avoid the error message.

    Using the Externalinterface:

    Another interesting thing might be this discussion handling your Problem exactly ... Read it to the end, there the guy seemed to have found out what the problem was ... something with page headers.

    Author Comment


    This is the exact behavior which is used in Iframe in my application also.
    I'm not sure how to use the code given in

    But i'll try 1st Approach of External Interface.
    Could you please specify in detail how to use the External Interface in my scenarion

    var loader: Loader = new Loader ();
    loader.load(new URLRequest("anyImage.jpg"));

    Open in new window

    LVL 20

    Accepted Solution

    Well the Component will create a dynamic IFrame. This will have an ID that is somehow related to the id of the Flex component. I'd suggest to find out which one manually by using Firebug or InternetExplorer Toolbar.

    As soon as you have the Id Id suggest you create a JavaScript function in your embedding HTML file, which takes two parameters. The Id of the IFrame and the Url you want it to display.
    In this function you do something like
    var iframeElement = document.getElementById(iframeId);
    And replace the url it should display:
    iframeElement.location = newUrl;

    Now all you have to do is to call this function using the external interface.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    Title # Comments Views Activity
    Flash builder 101 tutorial 3 404
    Refresh Image 2 30 920
    Flex 4.6 -- not able to Enable text fields 2 516
    Shape with multiple lineStyle assigned 6 246
    First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
    After several days of searching and hunting for limited documentation, I wanted to share this guide to hopefully save someone the hassle of trying to figure this out on their own. I have tested this on Xendesktop 7.1 and PS 4.5 running simultaneous…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now