TypeError: Error #1006 - MovieClip to remove from the scene

I have a clip that is called to the scene and when the movieclip is finished, it calls a function that removes from the scene. The code works, but I get an error message about 4 seconds after the music ends.

Here is the error message:

TypeError: Error #1006: exitWordMicroscopic is not a function.

to ASvocabulary_microscopic / frame110 () [ASvocabulary_microscopic::frame110:1]

Here's the code in step:

Removes the movieclip on the stage and allows the highlight *.

function exitWordMicroscopic (): void

{

bnt_vocab_microscopic.mouseEnabled = true;

removeChild (word_Microscopic);

}

//******************************Stage buttons**************************************

stage.addEventListener (MouseEvent.MOUSE_DOWN, goButtonsHomeRead_1);

function goButtonsHomeRead_1(event:MouseEvent):void

{

Buttons of vocabulary

If (event.target is bnt_vocab_microscopic)

{

bnt_vocab_microscopic.mouseEnabled = false;

SoundMixer.stopAll ();

addChild (word_Microscopic);

word_Microscopic.x = 47;

word_Microscopic.y = 120;

}

}

Here is the code inside the clip. That's what the error message is referring to:

Calls to withdraw from the scene function *.

Object (parent) .exitWordMicroscopic ();

What I am doing wrong?

There is a more OOP good way to do this, but for now, you can use...

Object (parent.parent) .exitWordMicroscopic ();

function exitWordMicroscopic (): void

{

bnt_vocab_microscopic.mouseEnabled = true;

mc_EmpytMovie_Micro.removeChild (word_Microscopic);

}

Tags: Adobe Animate

Similar Questions

Maybe you are looking for

  • I have no camera (coming soon!) Cat use headset only possible?

    Sorry if the answer is on these forums or on the site somewhere, I looked long, but can not find an exact match for my situation. For now I have a very old PC and no camera at all. Soon I will have a new computer laptop and everything that goes with

  • Admin password does not work

    I normally Hibernate my computer for several days and finally it does not get.  This time, go back to the password says that he was wrong after trying several times.  I rebooted the computer several times, but it still says its wrong.  I thought to u

  • (Redirected) Keyboard and mouse interaction.

    Inspiron 15R 5537 I have this thing running on Windows 8.1. My problem is that if I hit a button, there is a delay until the touchpad and buttons are functional. My brother suggested is no no not the mouse disappears when you type, but that has not w

  • Change of the Windows experience index

    Hi there, my Pc has pre installed Windows 7 installed. Now, one day when I play VICE CITY. My computer is same trolling even if I play in this situation of delay, it will stop. Because of that I got my PC Factory Condition but still the game is late

  • Applications blackBerry Smartphones moving on the memory card

    How it does it move additional applications, such as WorlMate Live on the memory card to free up main memory?