I’ve got some code that removes my movie-clip when i use the back button on my android device,but in my movie clips i use the stageWebView function Is there any way of removing the stage web view from the stage when my back button is activated?
“mc” loads a array of moveclips from my library
i have tried using the back function in my movie clips but it just throw back errors this was the only way i got it working
function loadClass(e:MouseEvent):void
{
var ClassRef:Class = getDefinitionByName( e.target.text ) as Class;
var mc:MovieClip = new ClassRef();
mc.width = mc.width;
mc.x = mc.x+15;
mc.y = mc.y+380;
addChild(mc);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey2);
function backsearch():void
{
removeChild(mc);
mc = null;
}
function onKey2(e:KeyboardEvent):void
{
if(e.keyCode == Keyboard.BACK)
{
e.preventDefault();
if(mc) backsearch();
}
}
}