Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

remove stageWebView issue

Participant ,
May 26, 2018 May 26, 2018

I have this code inside a function:

var webView:StageWebView = new StageWebView();

webView.stage = this.stage;

webView.viewPort = new Rectangle(0,btnTilbake.height,stage.stageWidth,stage.stageHeight);

webView.loadURL(bgmList12[int(button.name.slice(4, button.name.length))]);

//it loads a webpage just as it is supposed to.

I have a button, if I click it I want to remove or hide the webView, the buttons triggers this code:

else if (tilbake == 1) {     //This is my removewebView/hide

trace("JAAAAAA DEN ER 1");

/* I have tried this code:

webView.stage = null; 

webView.dispose(); 

/* I have tried this code:

webView.viewPort = null;

webView.stage = null;

webView.dispose();

/* I have tried this code:

var htmlString:String = "<!DOCTYPE HTML><html><body style=background:#000000><p></p></body></html>";

webView.loadString(htmlString);

webView.reload();

webView.viewPort = null;

webView.dispose();

webView = null;

/* I have tried this code:

webView.viewPoer=(2000,2000,2000,2000); //to just get it away from my screen.

}

It traces this sentence as a test:

JAAAAAA DEN ER 1

Anyone got a clue of why it does not work? As I have done this the excact same way before Thanks

TOPICS
ActionScript
482
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 27, 2018 May 27, 2018
LATEST

use

webView.dispose()

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines