Remove the MovieClip with event.target.content

Hi everyone please I need your help I have this code and I want to delete baresClip but I cante removeit Please helpme

var loaderBares:Loader = new Loader();

loaderBares.unload ();

loaderBares.load (new URLRequest("negocio/bares.swf"));

loaderBares.contentLoaderInfo.addEventListener (Event.COMPLETE, loadBares);

function loadBares(event:Event) {}

var baresClip:MovieClip = event.target.content;

baresClip.x =-474;

baresClip.y = - 135;

addChild (baresClip);

baresClip.over1.receta1.addEventListener (MouseEvent.CLICK, prueba);

function prueba(event:MouseEvent):void {}

gotoAndStop ("receta1");

removeChild (baresClip); / * Here is work * /.

}

MovieClip (root),.mc_negocio.menu_negocio.btn_botanas.addEventListener (MouseEvent.CLICK, goToBotanas);

function goToBotanas(event:MouseEvent):void

{

removeChild (baresClip);   / * Here is not work * /.

gotoAndPlay ("botanas");

}

Oh, I see what you're doing.  you entered baresClip local loadBares.

to remedy this, use:

var baresClip:MovieClip

var loaderBares:Loader = new Loader();

loaderBares.unload ();

loaderBares.load (new URLRequest("negocio/bares.swf"));

loaderBares.contentLoaderInfo.addEventListener (Event.COMPLETE, s loadBare);

function loadBares(event:Event) {}

baresClip = event.target.content;

baresClip.x =-474;

baresClip.y = - 135;

addChild (baresClip);

baresClip.over1.receta1.addEventListener (MouseEvent.CLICK, prueba);

function prueba(event:MouseEvent):void {}

gotoAndStop ("receta1");

removeChild (baresClip); / * Here is work * /.

}

MovieClip (root).mc_negocio.menu_negocio.btn_botanas.addEventListener (ouseEvent.CLICK, goToBotanas M);

function goToBotanas(event:MouseEvent):void

{

removeChild (baresClip);   / * Here is not work * /.

gotoAndPlay ("botanas");

}

Tags: Adobe Animate

Similar Questions

  • event.target.content.loaderInfo gives error if I'm to access images of the external field (SecurityErr

    I'm working on OSMF-based player. I added the image of the logo at the top right of my player. Now, I want to open a link when you click on the logo image.

    I wrote a script code Action in onMouse during the event

    CODE:

    private void onMainClick(event:MouseEvent):void {}

    If (Event.Target.hasOwnProperty ('Content'))

    {

    var info: LoaderInfo = event.target.content.loaderInfo;

    var imageUrl:String = configuration. LogoImage; Logo url to view the player

    imageUrl = imageUrl.split("/").splice(1).join("/"); "

    If (info. URL. Search (ImageUrl) > = 0)

    {

    var url: String = configuration. LogoLink; Logo link to open it in a new tab

    var request: URLRequest = new URLRequest (url);

    Try

    {

    navigateToURL (request, "_blank");

    }

    catch(Error:Error)

    {

    trace ("Error occurred!");

    }

    }

    }

    }

    When I give the url of the Logo of the same domain, it works very well (given the url will open in a new tab). Problem occure when I access the image of the external domain. A field that doesn't support request to my domain.

    More information: the Logo image appears correctly on the upper right of my player. On clcik logo url, I am getting error below. I am providing the url of the logo of my config file

    SecurityError: Error #2123: security sandbox violation: Loader.content: http://10.1.0.126/release/XYZPlayer.swf Can't access to http://www.esnipe.com/shared/help_icon.gif . Access granted to no political file.

    to flash. display::Loader / get content())

    to StrobeMediaPlayback / onMainClick)

    Please can someone help me out of this error.

    use:

    var info: LoaderInfo = event.target.contentLoaderInfo;

  • How to remove the alarms and events database of Citadel?

    Hello

    I use LV 2010 with DSC.

    I made a mistake in my program and I wrote too much data event and alarm at the Citadel. Database *.mdf/*.ldf files are quite large > 1 G. Normally, I connect only two alarms per day. I want to delete all events alarm + data before a certain time of stamps for example. 1.1.2011. How can I do? I tried to use MAX and perform the operation so I wrote small program which reach the data from temporary database and then remove it. Yet I can find old events and alarms... I am able to remove the traces of old but not the events/alarms. How do I remove the alarms and events?

    Thanks, Jim

    Hi Jim,.

    Have you seen this:

    http://forums.NI.com/T5/lookout/how-can-I-delete-alarm-and-event-data-from-a-Citadel5-database/m-p/5...

    Not sure if it is valid with the current version, but worth it.

  • I need script to remove the line with 2 points, another script to remove next lines

    I need script to remove the line with 2 points, another script to remove next lines of two scripts needed help please

    Thanks in advance

    Concerning

    Lakshmiganth

    Scroll through each pathitem and look at the length of his pathPoints group.  If the length is equal to 2 and then use the remove() method to remove it.  For example (this is rough, off the top of my head):

    var lines = new Array();

    for (i = 0;  I have< app.activedocument.pathitems.length; ="" i++)="">

    If (app.activeDocument.pathItems [i].pathPoints.length == 2) {}

    Lines.push (App.activeDocument.pathItems [i]);

    }

    }

    for (i = 0;  I have< lines.length; ="" i++)="">

    Lines [i]. Remove();

    }

  • HELPS to remove the movieclip when loading another.

    Dear users of the forum,

    I have buttons randomly on the scene that I have implemented so each of them, when you click on it, will load different movieclip.

    These movieclips load directly on top of the other in the same exact place.

    The problem I have is the previous movieclip not clearly end the scene when the user clicks on the next button.

    Someone please help me understand this? I need to set up a condition that will remove the current movieclip when another button is selected to load the next movieclip.

    Here's the part of my code that needs editing. I did research on switch, else and other conditional statements, but cannot find a way to get there.

    Thank you for helping,
    Sincerely,
    Steve C.

    I have the FLA or swf for display, please let me know.


    Event listeners
    hempelbtn.addEventListener (MouseEvent.CLICK, btnActions);
    fourtyonebtn.addEventListener (MouseEvent.CLICK, btnActions);
    draycottbtn.addEventListener (MouseEvent.CLICK, btnActions);
    egertonbtn.addEventListener (MouseEvent.CLICK, btnActions);

    Tween declared out of service
    var HemMCTween:Tween;
    var FourMCTween:Tween;
    var DrayMCTween:Tween;
    var EgerMCTween:Tween;

    Function
    function btnActions(evt:MouseEvent):void {}
    If {(evt.target is hempelbtn)
    HemMCTween = new Tween(HemMC,"x",Strong.easeInOut,1050,623,2,true);
    }
    If {(evt.target is fourtyonebtn)
    FourMCTween = new Tween(FourOneMC,"x",Strong.easeInOut,1050,623,2,true);
    }
    If {(evt.target is draycottbtn)
    DrayMCTween = new Tween(DrayMC,"x",Strong.easeInOut,1050,623,2,true);
    }
    If {(evt.target is egertonbtn)
    EgerMCTween = new Tween(EgerMC,"x",Strong.easeInOut,1050,623,2,true);
    }
    }

    I used the following code to show a menu, creating a similar code for each button.

    addEventListener ("forecasterClicked", gotoforecaster);
    function gotoforecaster(e:Event):void {}
    mc_forecaster. Visible = true;
    mc_igd_test. Visible = false;
    mc_user_test. Visible = false;
    mc_task_test. Visible = false;
    mc_apps_test. Visible = false;
    mc_help_test. Visible = false;
    }

  • Cannot remove the MovieClip

    Hello

    I feel very difficult to remove a clip that has been created with createEmptyMovieClip. I tried everything, unloadMovie, removeMovieClip with various varations (I checked the references and variables are defined), the movieclip will simply not disappear!

    Inside of this clip there are several other clips with associated classes and objects given birth from there that's important?

    Does anyone have any idea why it is so difficult to remove just a MovieClip?

    Thanks a lot again, this forum has been really helpful, I'm trying to be useful also, but you are simply too quick to answer the questions I'll be here more often from now on

    Sometimes you swapdepths with something else by using the swapdepths command before deletion works. You can also try to insert a command removemovieclip inside the timeline of the movieclip itself.

  • Safely remove the device with VISTA is not infallible

    I have a HP Pavilion Slimline nine running Vista.

    I plug a USB key or an external hard drive and it reads very well.

    I have try the safely eject button, and the light on my memory stick stays on. With XP, it came out, and I knew that I could remove the stick. It goes the same for my external hard drive... Done, I could hear that he stop and watch out slight shift when I used the feature of MATERIAL in any SAFETY REMOVE (SRH) of XP.

    Not the case with VISTA. After completing the SRH steps, these devices always seem to be on.

    I read that Vista not turn off light after things are ejected... is - it true?
    Any suggestions?

    Are there any patches or downloadable patches?

    Hello walden1,

    Thanks for posting on the Microsoft answers Community Forum.

    The only time where SRH did not finish is when there is an application or a service that is always access the drive somehow.  I fyou're sure there is no transfer, then you can disconnect with the safety of the food.  themajin concern is when access to the data or transfer is underway.

    -J' read that Vista not turn off light after things are ejected... is - it true?
    It has been my experience that it's false.  Once ejected, using SRH or not the light turns off and the player is uninstalled.  Now, if you use memory for ready boost of course light remains lit and SRH still not eject it.  So maybe it's somehting that you'll want to check.  If your right click the drive in the Solution Explorer, then select properties the last tab should be the tab ready boost and you can switch if and how much of the training will be used for this.

    Thank you
    Jonathan

  • Remove the compatibility with older Versions of Adobe Acrobat

    I'm trying to scan hundreds of documents as PDF files using Adobe Acrobat Pro 9.5.5. I'm on Mac, the latest version of El Capitan and find that Preview 8.1, the PDF Viewer integrated for OS X, has difficulties to open a portion of my scanned documents. Interestingly, the only ones who have color in them. Black and white analysis open very well. I think it's an Apple problem, and not what I'm here for.

    Anyway, I went back to PDF it wasn't opening and Acrobat to remove compatibility with earlier versions of Acrobat. I kept compatibility with "Acrobat 4.0 and later versions. After that the file opened without problem in the preview. I noticed that the quality of the new PDF degraded slightly when I removed the compatibility. I guess that's because Acrobat must perform a new rendering of the PDF file.

    Is there a way I can create a PDF file to a JPEG file that is only compatible with versions 4.0 and later? I rather do pretty early in my workflow, and then go back and remove the compatibility and degrade image quality.

    Thank you!

    Hi Link648099,

    First thing, Acrobat 9 is not compatible with Mac El Capitan.

    The PDF created in Acrobat 9 shouldn't be compatible with version 4, please check the levers of the compatibility of the https://acrobatusers.com/tutorials/understanding-pdf-compatibility-levels PDF

    Kind regards

    Nicos

  • Remove the line with alert button

    Hello

    I have a table which can add and delete rows dynamically. An alert must be added to the button delete what I've done.  The works warning, but when you select OK on the alert line is not deleted.

    It would be the right way to accomplish this?

    I'm not a programmer and now wondering if my edit code is wrong or there is an alternative solution.

    Thank you

    Capture.PNG

    This is the code I have for the button Delete.

    Form1. FSE_1.Pre_EX. Buttons. Remove::click - (JavaScript, both)

    CMSG var = "continues with the action underway will remove all entries in cell in this row.

    CMSG += ' \n\nDo you want to continue?

    var nRtn = app.alert (GSMC, 1, 1, 'Question Alert Box');

    if(nRtn == 4)

    {If (Table1._Item.count > 1)

    Table1._item.removeInstance (Table1._Item.count - 1);

    Console.println ("the answer is Yes");

    }

    Another yew (nRtn is 3)

    {/ / No answer}

    Console.println ("the answer is no");

    }

    on the other

    {//Unknown response

    Console.println ("the response was something other than yes/no:"+ nRtn ");

    }

    ------------------------------------------------------------------------------------------ ----------------------------------

    This is the code I have for the button Delete before adding the alert that worked.

    Form1. FSE_1.Day_1.buttons.Remove::click - (JavaScript, both)

    If (Table1._Item.count > 1)

    Table1._item.removeInstance (Table1._Item.count - 1);

    The way I understand how it works at the moment, is that you remove the last line of the table... If you want to delete the line where is the button Delete, you should be removing the instance itself with its index...

    rather than use the following line

    Table1._item.removeInstance (Table1._Item.count - 1);

    You should have something like this

    'this' being button and tell me that you have a subform to remove and add the button

    Table1._item.removeInstance (this.parent.parent.index); the first parent is the subform and the second parent is the line

    I hope this helps!

  • Add/Remove the effect with CSS

    Hello

    I'm trying to implement some sort of entry in my application validation. I expanded TextField to accept only the entry with a number of characters and corresponding to a regular expression. When the regular expression match falls, I want textfield to have an innershadow, and he does. However, the effect is not removed when I remove the CSS class where this effect is defined.

    setOnAction(new EventHandler<ActionEvent>(){
                @Override
                public void handle(ActionEvent e) {
                    if(!getText().matches(restrict.get())) {
                        getStyleClass().add("invalid");
                    }
                    else {
                        getStyleClass().remove("invalid");
                    }
    
                    for(int i=0; i<getStyleClass().toArray().length; i++) {
                        System.out.println(getStyleClass().toArray()[i]);
                    }
                }
    

    .text-field.invalid {
        -fx-border-color: indianred;
        -fx-effect: innershadow(gaussian, indianred, 5, 0.5, 2, 2)
    }
    

    The style class "invalid" appears in the table when the entry is not valid. The class is removed successfully, but not the effect. How can I fix it? Do I need to set the effect in code and no CSS?

    Have you tried this:

    .text-field.invalid {
        -fx-border-color: indianred;
        -fx-effect: innershadow(gaussian, indianred, 5, 0.5, 2, 2)
    } 
    
    .text-field {
        -fx-border-color: indianred;  // change to some other color maybe transparent or use null
        -fx-effect: null
    } 
    

    Could be he you pls tell me how to use the CODE tags.

    Post edited by: jojorabbit

  • How to rotate the movieclip with drag and drop?

    Hello everyone,

    I work with drag and drop game.

    I'm done with drag and drop. now, I have problem in totating the movieclip.

    I want video clip rotate using the mouse. Do not use the click mouse. !!!

    Can someone give me a solution for this?

    var isDrageen:Boolean;

    var lastX:Number;

    var derriГЁre: Number;

    var dragX:Number;

    var dragY:Number;

    stage.addEventListener (MouseEvent.MOUSE_DOWN, down);

    stage.addEventListener (MouseEvent.MOUSE_UP, up);

    stage.addEventListener (MouseEvent.MOUSE_MOVE, mov);

    function down(e:MouseEvent):void {}

    isDrageen = true;

    lastX = mouseX;

    derriГЁre = mouseY;

    }

    function up(e:MouseEvent):void {}

    isDrageen = false

    }

    function mov(e:MouseEvent):void {}

    {if (isDrageen)}

    dragX = mouseX-lastX;

    dragY = mouseY-derriГЁre;

    MC.rotationY += dragX/1.65;

    MC.rotationX += dragY/1.65;

    lastX = mouseX;

    derriГЁre = mouseY;

    }

    }

  • Remove the archivelogs with RMAN

    Hello

    I usually remove archivelogs with RMAN with command as ' ARCHIVELOG DELETE ALL COMPLETED BEFORE ' SYSDATE - 1' if I have to erase the archivelogs to free the space of FRA.»»

    My question is if I delete the archivelogs will it deletes the records in the catalog also (I think) so backed up on tape. In this case the catalogue is not information for these records even if they are on cassettes, correct?

    So in the case of collection how can I restore them?


    Thank you

    Published by: 822424 on May 15, 2011 19:28

    The catalogue contains information about the backups.

    Before you remove the archivelogs, I assume that you have done a BACKUP ARCHIVELOG (or with the database as a BACKUP database PLUS ARCHIVELOG DATA). Therefore, backups are in the BackupSets that are in the catalog.

    Hemant K Collette

  • Satellite 5205-S505 - how to remove the battery with the damaged battery latch?

    I try to set aside my laptop (satellite 5205-s505) today. But I found that the release latch was damaged somehow. What can I do?

    My seriously damaged lcd. I have method to close the LCD to save energy (just use external moniter)?

    This battery is a very good question. I think you're the first person who asked it.
    If you cannot remove the only way is, I think, to disassemble the entire laptop and somehow free battery.

    When you use the external monitor, you have to use the FN + F5 key combination and switch to an external monitor only. Portable computer's LCD will be OFF.
    You can also check the Advanced display settings. Usually, you can also find settings to define where should be the office.
    Check it out!

  • What happens if I remove the battery with the power adapter on Satellite Pro L

    What happens if I remove the battery when I use my laptop directly on the AC adapter / CC?

    Thank you

    Hello

    If the laptop is ON it s not advised to remove the battery.
    You can remove the battery while the laptop is OFF.
    Remove the battery, connect the AC adapter and turn on the laptop

    Good bye

  • How to use the user with event loop event

    Hello

    I want to communicate between 2 VI, so I have a global variable (boolean) who gives the order to an event tool to run. The problem comes from the fact that event loop accepts no global variable, I found on the forum that I can use the user event. Of course, the second VI works normally when I push the button (boolean) in there to run the event loop. Please can someone explain me how to do this, I am a chemist.

    Thank you.

    You enter the receiver structure of event for the event you want to receive.

    To do this in two screws, you will have to share the user between them event reference.

Maybe you are looking for