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

I need to remove a library item from the stage

New Here ,
Apr 18, 2013 Apr 18, 2013

Right now I have a button that brings a library symbol to the stage. Ideally, I want to be able to click on the symbol itself to make itself from the stage. Can anyone help me with this?

TOPICS
ActionScript
343
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

correct answers 1 Correct answer

Community Expert , Apr 18, 2013 Apr 18, 2013

for example:

var sym:WhateverClass=new WhateverClass();

sym.addEventListener(MouseEvent.CLICK,clickF);

function clickF(e:MouseEvent):void{

e.currentTarget.parent.removeChild(e.currentTarget);

}

Translate
Community Expert ,
Apr 18, 2013 Apr 18, 2013
LATEST

for example:

var sym:WhateverClass=new WhateverClass();

sym.addEventListener(MouseEvent.CLICK,clickF);

function clickF(e:MouseEvent):void{

e.currentTarget.parent.removeChild(e.currentTarget);

}

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