Skip to main content
October 18, 2015
Answered

Embedded google maps but when finished the view does not dissapear

  • October 18, 2015
  • 1 reply
  • 521 views

I am making an app for android and I have imported a google maps location into the app but the problem is that when I press the back button it takes me back to my home page as it should but it does not remove the embedded google maps. Please could someone give me the action script code or some kind of method so that after using the google maps I can go back without it staying there. Thanks in advanced for any help it is much appreciated .

The action script I have used is:

import flash.media.StageWebView;

button_back_maphome.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_maphome);

function fl_ClickToGoToAndStopAtFrame_maphome(event:MouseEvent):void

{

    webView.dispose();

    gotoAndStop(1);

}

var webView:StageWebView = new StageWebView();

webView.viewPort = new Rectangle( 0, 300, this.stage.stageWidth, this.stage.stageHeight-300);

webView.stage = this.stage;

webView.loadURL("I inserted my google maps tag here");

This topic has been closed for replies.
Correct answer nezarov

Try:

webView.stage = null;

webView.viewPort = null;

webView.dispose();

1 reply

nezarovCorrect answer
Inspiring
October 18, 2015

Try:

webView.stage = null;

webView.viewPort = null;

webView.dispose();

October 18, 2015

Thanks heaps man it works perfect now

Inspiring
October 18, 2015

You're welcome my friend