1
votes

I have a Flex HTML component that is displaying content from a remote URL and a button in the Flex application that reloads the content. However, it takes a few seconds for the IFrame's content to refresh. During this time, there is no obvious feedback to the user that any action is underway.

I would like to clear the contents of the IFrame, so there is immediate feedback after clicking refresh, and then load the remote URL again. Is there a way to do this?

I've tried setting the HTMLText property to "" and setting the IFrame location to "about:blank", and neither of these have the desired immediate effect. (on it's own, setting the location to about:blank immediately clears the IFrame, but if it is followed by resetting the location to the original URL, the immediate clearing doesn't occur. Is this something to do with the IFrame caching the original page?)

2
What Flex HTML Component do you have? There are a lot of "options" for these out there, without knowing the API for the one you're using; it is tough to provide any advice.JeffryHouser
I'm using (what I think is) the standard HTML component: help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/…. And I'm using it inside an Air desktop application to access remote content.Eric G
Remove the component and add an instantiated component back.Jason Sturges
@JasonSturges - that's what I went with, thanks. Care to post that as an answer?Eric G

2 Answers

0
votes

One approach is to remove the component from the display list and add a new instantiated component back in its place.

This will assure fully initialized state.

0
votes

One other way you could get around would be having a blank iframe or loading screen ready with the same size and same position, while the contents are being loaded, hide the content iframe, and show the blank iframe or loading screen. This could be much easier to achieve a more flexible result.