?
Solved

Adobe Flex - load Never complete problem

Posted on 2009-04-15
6
Medium Priority
?
637 Views
Last Modified: 2012-05-06
Hi,

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
Puneet
0
Comment
Question by:PuneetKSaxena
  • 3
  • 2
5 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 24156209
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.
0
 

Author Comment

by:PuneetKSaxena
ID: 24160577
HI

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

0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 24162642
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
ExternalInterface.call(methodName:String, [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:
http://www.adobe.com/devnet/flash/articles/external_interface_05.html

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.
http://www.actionscript.org/forums/showthread.php3?t=152069&page=2
0
 

Author Comment

by:PuneetKSaxena
ID: 24165051
HI,

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
http://www.actionscript.org/forums/showthread.php3?t=152069&page=2.

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

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

Open in new window

0
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 2000 total points
ID: 24165743
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.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Social messanging services like WhatsApp and Facebook can help businesses in ways that many owners don't even imagine, giving new opportunities to connect with customers. Discover some of the most innovative things they can do for your company.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 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