Skip to main content
Inspiring
June 10, 2012
Answered

stagewebview is persisting across tabs flex mobile

  • June 10, 2012
  • 2 replies
  • 648 views

I have a flex mobile app with 4 tabs. On one of them I am using the stagewebview. When I first visit the tab it is shows the webview, but then if I go to any of the other tabs it is still there obscurring my other components.

Why is it persisting across the tabs?

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer james0072255

I figured it out.

this.addEventListener(ViewNavigatorEvent.VIEW_DEACTIVATE,removeWebView);

private function removeWebView(e:Event){

                webView.viewPort = null;

                webView.dispose();

                webView = null;

            }

2 replies

Chris W. Griffith
Community Expert
Community Expert
June 11, 2012

Glad you found the correct solution. Like most 'Stage'* items in AIR mobile, they exist outside the normal display list and thus have to be manually managed.

james0072255AuthorCorrect answer
Inspiring
June 11, 2012

I figured it out.

this.addEventListener(ViewNavigatorEvent.VIEW_DEACTIVATE,removeWebView);

private function removeWebView(e:Event){

                webView.viewPort = null;

                webView.dispose();

                webView = null;

            }