How to Remove a Movie Clip

Hi,
On the main timeline, I have the following code:
external_btn.addEventListener(MouseEvent.CLICK, showMenu);
function showMenu(e:MouseEvent):void
var myMovieClip:MovieClip = new Member();
addChild(myMovieClip);
myMovieClip.x = 597.95;
myMovieClip.y =359.15;
in the internal movie clip, that I linked it to Member:
In the member movie clip, I have the following code to remove the movie clip that was created in the main timeline of the root movie clip.
release1_btn.addEventListener(MouseEvent.CLICK, goBack1);
function goBack1(e:MouseEvent):void
MovieClip(root).removeChild(myMovieClip);
I received the following compiler error:
1120: Access of undefined property myMovieClip.
Please help me know how to resolve this error message.
Thanks,
Robert.

that's (coding on more than one timeline) not good coding style, but this will correct your error and the prevent a few more:
release1_btn.addEventListener(MouseEvent.CLICK, goBack1);
function goBack1(e:MouseEvent):void
MovieClip(this.parent).removeChild(this);

Similar Messages

  • Remove ALL movie clip

    Hi,
    Is there a code to remove all movie clip when a button is
    press? Sorry. Im new to AS

    hey Scruffy - as I mentioned in your other post it will
    depend on how these clips were brought to the Stage to a certain
    degree. to be safe one should go ahead and use swapDepths first and
    then iterate through all MCs within the swf, as in the following:

  • How do I transfer movie clips from iPhoto to iPad?

    How do I transfer movie clips from iphoto on my iMac, to my iPad?

    You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import.
     Cheers, Tom

  • How can i remove a movie clip container

    Hallo friend,
    I am dealing with this problem.
    In the first frame of my project i am designing a movie clip
    dynamicaly - with action script 2 - which i use as a container in
    order to fill it with attachments to other movie clips and with
    text boxes which i make dynamically too.
    The problem is that i want to delete this container in order
    to have a quickly way to delete the object that contains, but i
    can't find a way to do this.
    I have tried the functions removeMovieClip() and
    unloadMovie(), but there was no result.
    Please, can somebody help me with this ?

    Friends forgive me for my absence but i do had a very
    defficult period, as i wal looking for new job.
    Enyway, now i have time and tommorow i will post the code, in
    order to let you understand the way i build it.
    My friend, uomodicuore2 i use the correct path to the
    function unloadMovie() and removeMovieClip()
    Friend ric5611 i don't use flash components

  • How to remove a movie from iMovie theater

    It was very easy to create a movie in iMovie, and click on "Share to Theater". But no amount of clicking, pressing delete, pressing Command Delete, or working through menus lets me remove the movie from Theater. I modified the Project, and now I want to replace it with a movie of the same name. What am I missing? How do I remove a movie in Theater, or at least update it with the latest?

    Hello John,
    It sounds like you should have been able to delete the movie from the Theater with what you were doing.
    Checking the iMovie Help, this is what I find.
    Add, remove, and play clips and projects in iMovie Theater - iMovie Help
    Delete a movie from the Theater
    Items in iMovie Theater can exist in the Theater only, or in the Theater and in iCloud. If you delete a movie from the Theater, it’s removed from iCloud as well. For more information, see Set up iMovie Theater and iCloud.
    Click the Theater button in the toolbar.
    Select the movie you want to delete.
    Press Delete.
    In the dialog that appears, click Delete Everywhere.
    The movie is deleted from the Theater and from iCloud.
    Best,
    Nubz

  • How do I recerence Movie Clips on the Main Timeline from inside a class?

    Hey everyone, this might be a stupid question but I thought
    I'd ask cause it's making me nuts. I'm all of 2 days into AS3
    (coming from not using Flash at all in YEARS) so feel free to
    consider me ignorant. I do have plenty of application development
    experience in other areas though.
    I can't seem to create a class that can reference an instance
    of a movie clip on my main timeline. I'd post code of what I've
    tried but I've gone through so many desperate edits & wild
    guesses that it was just garbled junk before I deleted it all.
    Basically here's how I figured Flash could work, though maybe
    it doesn't work this way at all.
    I'm assuming that with AS 3 being so big on being a true
    object oriented environment, I wouldn't need to mix my code and
    interface together. Preferably I'd be using the Flash authoring
    tools just to design my interface. Create a button... place it
    somewhere... give it an instance name. Roughly the equivilant of
    Apple's InterfaceBuilder for those of you that might be familiar
    with Cocoa development. I can see maybe having to put a few lines
    of ActionScript onto frame 1 (though really I'm hoping Flash would
    have a better method of kicking off the application at this point
    that using code tied to frames) to load my classes & such, but
    after that I'd like all of my code to be held in external class
    files.
    So maybe I've got:
    Interface.fla - My interface
    Button_1
    Button_2
    TextField_1
    Main.as - My main controller class using to handle all of my
    applications behavior
    SomeClass.as - Some helper Class
    SomeOtherClass.as - Some helper Class
    Main.as would have instructions in its initialization method
    to go ahead & attach events to buttons & initialize
    anything else that needs to happen when the application starts.
    From there on it would all be objects communicating back &
    forth. Button_1 would get clicked with would fire
    Main.someMethod(). Main.someMethod() would then do it's thing and
    set the value of TextField_1. All very clean & code is very
    separated from interface.
    Unfortunately I can't for the life of me figure out how AS3
    classes reference each other like that. There doesn't seem to be
    any kind of a global 'root' or '_root' I can use to locate any
    movie clips on the stage. I've searched the help & the web for
    any kind of simple tutorial but to no avail. My job has tasked me
    with building a flash app for a project but I'd really rather not
    have a tone of ActionScript just shoved into frame 1. That just
    seems... ugh! (::shudder::)
    Can someone maybe point me in the right direction here? I'm
    really willing to do my homework but I can't seem to locate the
    info I need to get started. Also, is there an ActionScript IRC
    channel or something maybe?
    Thanks,
    Cliff

    I worked with the problem last night and the solution I
    started coming to involved creating my own custom document class
    based off which extends MovieClip. My thought is that way I have
    access to the initialization routine of the timeline itself and
    that all of the elements on the main timeline should be
    "properties" of my custom class.
    Is this correct? Is there a down side to doing this & if
    so what is it & why?
    Also, just for my reference, the last time I did anything
    with ActionScript I think I was using '_root' to target the main
    timeline. WHat are the global variable names in AS 3? Is it just
    'root' & 'stage' or 'Root' & 'Stage' or what?

  • How do I backup movies/clips to use in future projects?

    After burning my first DVD & deleting the iMovie file, I was sad to discover that I could not just pop the DVD into my drive & access the material to use in future projects. (Is there a way to do do this that I don't know about?)
    I'm guessing I need to burn the archived iMovie file onto multiple regular CDs (I have not burned anything that spans several CDs before). This is confusing me because the zipped file is hardly smaller than the original (Is there a better zip program than the one that comes with this system?) I threw away the wrapper for my blank CDs so I don't know how much they hold but I think it is something ridiculously small like 670MB and the iMovie file is 7GB. Is this the only way to save my movie/clips so that I can bring clips into a future movie?
    1.8 GHz Power PC G5   Mac OS X (10.3.9)   256 MB DDR SDRAM

    welcome Novice to the  board ....
    hmm, multidimensional question ...
    DVD is end-of-the-road, not meant for further processing; there are tools, allowing to import DVD to iM, but that is a time-consuming and lossy (=losing pic quality) process, due to the deliver-format nature of DVDs.... search forum for "DVD import"
    iM is by concept not meant to handle a clip in many projects (that can easily been accomplished with pro tools as FC(E), which offer "bins" for imports, offering the content to many sequences/projects).
    there are workarounds, dragging clips from the internal files of an iM project to another... but, as said: you "fumble" the concept: import tape, edit, burn - done.
    a video contains ~13GB of data per hour... and, video is allready highly compressed, no zipper can reduce that dramatically... and, you risk damage of files... yepp, a cd-r fits ~700MB = 3.5min of video......
    recommended workflow:
    * don't store iM projects on -r media (cd/dvd), but firewire connected harddrives..
    * keep the tapes; import clips from tape into project; you can export single clips out of iM/import into another project, I wouldn't do that with "lots" of clips, importing the tape is... more convenient..

  • How to keep a Movie Clip on the screen for 5 secs.

    I am having trouble with keeping a movie clip on the screen.
    I am setting it up to play a movie using the .onPress function. It
    is calling the movie but only shows it for a split second. How can
    I make the movie stay on the stage for 5 seconds? Here is how I
    have it coded:
    rc1MC.onPress = function() {
    if (rc1MC.hitTest(_xmouse, _ymouse, false)){
    _global.correct++;
    updateStats();
    var c1:MovieClip = this.attachMovie ("correct1_mc",
    "correct1",4300);
    var ymov = this._y;
    var gravity = 20;
    c1.onEnterFrame = function() {
    ymov += gravity;
    xmov *= 0.5;
    c1._rotation += 5;
    c1._x += xSpeed;
    c1._y = ymov;
    if (c1._y>stageHeight) {
    c1.removeMovieClip();
    delete this.onPress;
    Thanks Brandon

    Got my answer...
    http://forums.verizon.com/t5/FiOS-TV-Technical-Assistance/For-Those-of-You-Who-Want-to-View-Subscrib...

  • How to stop a movie clip that is loaded dynamically

    Hello Flash Forum,
    I am using the loadmovie method to load a swf file into a
    movie clip "container"
    Code snippet:
    var mc:MovieClip = this.createEmptyMovieClip("mc",1);
    mc.loadMovie('bbc_module1.1.swf','bbc_audio',container.getNextHighestDepth(),
    {_x:300.8, _y:240});
    mc._lockroot = true;
    The movie clip I load does not have a stop action in frame 1,
    but comes up playing (audio and images). I am not using video. It
    is a series of still images synced to the audio.
    I would like to be able to load the movie clip, stop it from
    playing, and by clicking buttons, get it to play, pause, etc like
    the buttons and skin on the FLVPlayer.
    Any tips on how to do this?
    Thanks,
    eholz1

    Many thanks ClBeech!!!
    I've tried the code you suggested but it doesn't seem to work
    :0(
    I'm working on a Mac using Flash Pro 8 which only has the
    option to publish as 'actionscript 1.0 or 2.0' is the script you
    supplied an actionscript 3.0?
    Below is the script with the amendments, I've changed my
    button instance names to match the script you supplied (left_btn /
    right_btn)
    stop();
    import mx.transitions.Tween;
    import mx.transitions.easing.Strong;
    var rposX = 369;
    //the ending x of the right position
    var rposY = 84;
    //the ending y of the right position
    var lposX = 116;
    //the ending x of the left position
    var lposY = 154;
    //the ending y of the left position
    right_btn.onPress = function() {
    new Tween(content1, '_x', Strong.easeOut, content1._x,
    rposX, time, false);
    new Tween(content1, '_y', Strong.easeOut, content1._y,
    rposY, time, false);
    left_btn.onPress = function() {
    new Tween(content1, '_x', Strong.easeOut, content1._x,
    lposX, time, false);
    new Tween(content1, '_y', Strong.easeOut, content1._y,
    lposY, time, false);

  • How to email a Movie Clip in Flash

    Hi everyone.
    I am creating a painting / drawing application in flash.
    I want to add a functionality, which allows the user to send his/her painting to his/her email address.
    How can this be done?
    Please note that the painting / drawing would be a movie clip
    Help on an urgent basis would be greatly appreciated
    Thanks

    Hi,
    I did something similar for AS2:basically there was a "designer" swf where one could interact to create a design,
    and a "viewing" swf that contained all the bits and pieces used (e.g. a blank t-shirt).
    The designer swf would send data (placement of objects, coordinates of strokes) to the server, and the server would amend the blank viewer swf by compiling the data object and adding it as another code block. The code of the viewing swf would handle constructing the desired image, by placing objects, adding strokes, etc.
    With the simple structure of AS2 code, php could do that.
    I sort of believe that something similar could be done for AS3 if the server is able to run java (the flex sdk programs). Addition: PHP by itself should be able to replace an embedded text file ... such as an xml description of the artwork

  • How to remove a movie from iCloud and iMovie Theater?

    So I figured out how to publish a movie from iMovie 10 to the Apple TV channel iMovie Theater> by using the iCloud button. But now once it's there how can I remove it? Or is this a new way for Apple to get me to purchase more space in iCloud?

    There is a another solution as in my case. I was tired of all my lousy movies and so I deleted my entire iMove libary in my user folder. That "stranded" some movies in the Theater cloud which showed up on my Apple TV.
    What I did was go to System Preferences and chose "iCloud". Then under iCloud Storage I clicked "Manage...". Here you can go under Documents, etc and delete what is "backed up" in the cloud.

  • Dreamweaver CS4 How to play a movie clip by clicking an image

    Hi
    Can anyone recommend a DW Behaviour, Widget or simple piece of Javascript coding that would allow me to start (or start and stop) a movie clip by clicking an image.
    I have a web page created in DW CS4 which has 4 FLV video clips and I would like visitors to be able to start their clip of choice by clicking a small still from each movie stacked at the right side of the page.
    I've seen this done on many sites but don't know how complex it would be.
    Any help / advice much appreciated.
    Thanks
    George

    Hi Ned, thanks for the response;
    1.Yes I named the instance.
    2.I  don't beleive so. I started from the library creating a new symbol, added the graphics, added the key frames, then created the tween. Then I dragged the symbol onto the main stage and named the instance. So I don't think there is a movie clip inside an mc.
    Here is the main timline:
    Here is the mc timeline:
    Here is what I'm trying to do:
    stop();
    blk1._visible = false;
    blk2._visible = false;
    blk3._visible = false;
    ppk1._visible = false;
    ppk2._visible = false;
    ppk3._visible = false;
    storeCartons = new Array();
    storeCartons = [blk1, blk2, blk3, ppk1, ppk2, ppk3];
    startButton.onRelease = function() {
        myNumber = Math.floor(Math.random()*storeCartons.length);
        trace("myNumber "+myNumber);
        activeCarton = storeCartons[myNumber];
        activeCarton._visible = true;
              activeCarton.play();

  • How to flip a movie clip using actionscript

    I have a movie clip on the stage facing one way (--->) how
    can I make it face the other way (<---) by flipping it over (not
    rotating it) using action script 3?

    var flipTween:Tween = new Tween(mc, "scaleX", Regular.easeIn,
    mc.scaleX, mc.scaleX*(-1), 1, true);
    should do it I think.

  • How to print a Movie clip inside uiLoader?

    Hi,
    I;m making a flash application in AS3, and I've got a little problem.
    Which is here...
    Here is my code....
    /* Print Button Function Here.....*/
    print_btn.addEventListener(MouseEvent.CLICK,printPage);
    function printPage(evt:MouseEvent) {
        var printJob:PrintJob = new PrintJob();
        if (printJob.start()) {
            if (uiLoader.source.width>printJob.pageWidth) {
                uiLoader.source.width=printJob.pageWidth;
                uiLoader.source.scaleY=uiLoader.source.scaleX;
            printJob.addPage(uiLoader.source);    <------------ Error shows Here
            printJob.send();
    Actually I have a movie clip which contains a Print Button and a uiloader.
    uiloader loads differnt external movies.
    I applied a code to Print button to print those movies.
    But FlashProgram shows an error.
    which is Here....
    Scene 1, Layer 'Actions', Frame 2, Line 174
    1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.display:Sprite.
    Please tell me how to fix it.
    thank you...

    Thank you very much it's been really helpfull.
    Now it's working but there are two more issues which i want to dicuss now.
    1st issue is, it print the both movies (main movie & external both) but i only want to print that one which inside the uiloader only.
    2nd issue is, actually this application which I'm making is for users to apply various paints on roofs and walls to check how they looks.
    The issue is it only print the actual movie colors not those colors which have been currently applied. Or what i'm trying to say is that, " how can I print uiloader source movie with it's current colors settings?"
    thank you.

  • How to freeze a movie clip?

    Hi,
    I am new to flash, and I've never done animation before, so I'm a little confused on how to make a symbol movie clip, freeze and then keep moving.
    Do I need to do it frame by frame?
    I made a character walk from off the stage to the center by using a motion tween and it appears to be moving because I edited the symbol to make the legs move. But now I don't know how to make the legs stop when the character reaches the end of the motion tween. Is it even possible?
    I hope I explained myself clearly...All help is appreciated.
    Thanks

    the moving legs should be a movieclip.  that movieclip will be a child of the character movieclip.  the legs movieclip should have an instance name on the character timeline (eg, legs_mc).
    then if your character is added to the main timeline, assign an instance name (eg, character_mc) and when character_mc stops moving, use:
    character_mc.legs_mc.stop();

Maybe you are looking for