How to remove a clip of the scene through an event to send?

I have a video clip that is added to the scene. There is a Close button on this clip from movie I'd like to close and remove the clip from the stage. But the close button does not work when clicked, nothing happens.


Here is the flow with the code:

Add the clip to the scene

var myPlayCredits:mc_playCredits = new mc_playCredits();

stage.addEventListener (MouseEvent.MOUSE_DOWN, goButtons);

function goButtons(event:MouseEvent):void

{

If (event.target is Credits_bnt)

{

SoundMixer.stopAll ();

addChild (myPlayCredits);

myPlayCredits.x = 511;

myPlayCredits.y = 386;

}

This is the code on the button inside the clip that calls the sending

import flash.events.Event;

Stop();

closeCredit.addEventListener (MouseEvent.MOUSE_DOWN, closeCreditPopupScreen);

function closeCreditPopupScreen (event: MouseEvent): void

{

dispatchEvent (new Event ("RemoveMCcredit"));

}

Delete (is supposed to remove) the MovieClip from the stage when the user clicks the close button in the MovieClip.

stage.addEventListener ("RemoveMCcredit", RemoveCreditClip);

function RemoveCreditClip(e:Event):void

{

removeChild (myPlayCredits);

}

Anyone have any ideas?

Why don't you simply assign the event listener for the closeCredit button after you instantiate myPlayCredits and have just the event listener to call the RemoveCreditClip function directly...

var myPlayCredits:mc_playCredits = new mc_playCredits();

myPlayCredits.loseCredit.addEventListener (MouseEvent.CLICK, RemoveCreditClip); \

If you want to use the shipping event approach, try to assign the listener to the mc myPlayCredits, not the scene. (Or set of argument spread of the true event if you assign it to the scene)

Tags: Adobe Animate

Similar Questions

  • How to remove a Word from the default dictionary of firefox?

    How to remove a Word from the default dictionary of firefox?
    If I wanted to remove the word 'dog' or 'and' for example

    There may be a range of reasons for wanting to do this, including the deletion of the words you use rarely as similar to other common spellings used words for example. "minute" and "Minuet", delete the words that you find personally offensive, or removing words that, because of linguistic or cultural background, you would not consider words at all.

    Note that I'm not asking how to remove my 'dictionary' words, words that I added myself.

    Hello

    I talked to a few people and I think I'm able to help you with this.

    There are two dictionary files, the default that comes with your version of Firefox and personal 'custom' that you create yourself with phrases and words.

    If you want to change the personal;

    1. Copy Subject: support and paste into the address bar.
    2. Next to the profile folder, click the marked File Show
    3. Find the file persdict.dat. Rename a text file, open, modify, re save it as persdict.dat and replace.

    If you want to change the default dictionary, it could be more of a problem and a lot more technique to do. I would recommend that you look at the problem differently and consider filtering of pages based on inappropriate content using Add-ons such as ProCon Latte Content Filter.

    I hope this helps, but if not, please come back here and we can look at another solution for you.

  • If time machine is incremental how it removes previous versions when the disk is full, without breaking the chain, so do not be able to restore all changes since the first full file

    If time machine is incremental how it removes previous versions when the disk is full, without breaking the chain, so do not be able to restore the file with any changes made since the full backup first file...

    If the TM drive storage is full TM automatically deletes the version the oldest files for the new incremental backups can be made. Thus, in this case you cannot restore the versions that TM deleted because it takes more storage.

  • How to remove "Skype available" from the top of the notification page?

    How to remove "Skype available" from the top of the notification page - useless promotion!

    Hello!

    Disable the Skype status under Notification settings in Skype.

    All best
    Siim

  • How to remove a city from the weather app in IOS 9.2.1?

    I have an IPhone6S that I bought recently and am running IOS 9.2.1. I can't understand how to remove a city from the weather app. I tried to go to settings, where there is a list of all the applications on my phone except the weather app, so no help there. Any body can help me with this?

    You must tap on the small set of lines in the lower right to get list view. Then you can find the city that you want to delete, drag to the left to see the button Delete.

    See you soon,.

    GB

  • How to watch two clips at the same time on the other, with an opacity of 50% each.

    How to watch two clips at the same time on the other, with an opacity of 50% each. It is confirmed that the position of the object even two clips of mergers.

    Thank you

    PPut a clip on top of another in the timeline panel. In the video Inspector reduce the opacity of the clip on top.

  • How to remove a shortcut with the command line?

    How to remove a shortcut with the command line?

    How to make a backup of the local users and groups with command line?

    You delete a shortcut, just as you would remove any other file.  A shortcut will end with the extension ".lnk".  So assuming you are trying to remove the shortcut named "Shortcut.lnk" which appears to the user 'Bob's Office, you use the button Delete (del) or 'clear' command by specifying the full path to the file.  (Remember to put filename in quotes if there is a space anywhere in the path or name) as in:

    del "C:\documents and settings\Bob\Desktop\Shortcut.lnk".

    What kind of a backup 'users and groups' you want to do?  If there is a backup of the users and groups as written in the registry, a good registry as C:\WINDOWS\ERUNT backup program that will make the command line.  If you are trying to backup all users and their data as well, then you are better off with a backup program.

    HTH,
    JW

  • How to remove all information from the computer so I can sell it?

    How to remove all information from the computer so I can sell it?

    Hello

    You will want to format the hard disk:

    1. you can use DBAN - http://www.dban.org/

    or

    2. you can follow this tutorial to clean install up to the step where you format the disk, in which you would then STOP (because you just want to get rid of the files on the hard drive, do not install Windows) - http://www.sevenforums.com/tutorials/1649-clean-install-windows-7-a.html

    Kind regards

    Patrick

  • How can remove my account from the cloud to adobe

    How can remove my account from the cloud to adobe

    I would like to unsubscribe the service

    Hi mehranr34543413,

    Please contact the customer service. A customer service agent can help you with this request.

    Best,

    Sara

  • How to remove a page of the PDF document?

    How to remove a page from the PDF?

    Tools > Pages > delete

    Select that range from the page to remove

    Click on the OK button

  • How do while preserving clipping mask the structure layer sup?

    Hi guys,.

    I'm editing a map and a need for my map divided into several rectangular segments. My card is composed of several layers and layers of sup I need to keep. When I'm mowing hide the map with a rectangle all the layers of subs merge in a single layer. How do while preserving clipping mask the structure layer sup? Looks like a "layer mask" is the right tool, but doesn't seem like CS6 has it?

    See you soon

    Carpet

    Create new layer and move all other layers so that they are now under layers of the new layer. Draw a rectangle on the top layers, and then click the button mask in the layer panel. You have now created a clipping from the base of the layer mask.

  • How to make a link in the scene as an anchor?

    How to make a link in the scene as an anchor?

    I mean, for example, create a button with a link to go to the top or the bottom or other parts of the page. Thank you

    In the same example I have on this page illustrates this functionaility

    http://forums.Adobe.com/thread/1084037

    Darrell

  • How to remove a step with the polygon Lasso tool

    How to remove a step with the polygon Lasso tool

    In PS, all you have to do is to hit the DELETE key and you can go back a little with the polygon Lasso tool. How to accomplish this in Fireworks?

    Another option that gives you a lot of control is to use the tool pen instead of the polygon lasso. Because it's a vector path, you can refine the outline very easily using the tools of feather and Subselects and when you are satisfied with the result, click on modify > convert a path to the top. You can even choose to keep or delete the vector path in the preferences panel.

    HTH

  • How to remove a user from the application

    How to remove a user from the EBS application?

    12.1.3 R

    Hello

    You can put an end to the user date

    Connect to Oracle Applications - select the responsibility of the system administrator - security - user - define - query with the username - and then you can give the end date in the effective Date column.

  • How to remove unused objects from the webcatalogs?

    Hi friends,

    How to remove unused objects from the webcatalogs?
    is there a utility like the removal of unused objects of the physical layer in RPD?

    Thank you

    Hello

    Click link responses to the left of the answers click on the catalog button manage manage catalog, you can delete the unused objects

    Concerning

    NGO

Maybe you are looking for

  • Satellite A300-1lT - I want to restore Vista with recovery option

    Hello world With my Toshiba nothing but problems. First of all, I waited replacement screen for months cause it wasn t all at the warehouse. K, after that I went down to XP but pilot are buggy, sound is poor, cannot get USB 2.0 to work, the system is

  • Need an instalation own Vista - no recovery disc

    Hello Short version: I would like to have a clean install of Vista Business disc, not only the recovery media. I paid for the license (supplied with the notebook), and Microsoft has confirmed that I am entitled to it. But it is supposed to be provide

  • Trying to reset but rescue e-mail security issues is wrong

    Let's not ttrying to reset but emergency email address security issues. How can I change?

  • All-in-one HP ENVY 5530: problems scanning with Windows 10

    10 Windows does not recognize the scanner of my all-in-one.  I have no problem with it recognizing the printer and printing.  I removed the device and reinstalled several times.  As soon as I did this I can use the scanner in the device only, but not

  • Control charts missing Center

    I have an Optiplex 745 win 7 and have installed an Asus amd radeon hd5450 and have updated the driver but there is no Catalyst control center, when I installed on the disk, it was there but does not and then update the site of amd and all there is, i