Remove attached clip and go to a frame on a main movie

I am attaching a Movie Clip on a Main movie wthi sthis:
exit_btn.addEventListener(MouseEvent.CLICK, fexit, false, 0, true);
function fexit(e:MouseEvent):void{
    var mc:alert_mc=new alert_mc();
    mc.x=320;
    mc.y=210;
    addChild(mc);
I need to make the Main movie go to frame 6 and remove the attached clip when I click on yep_btn button. The code on the attached clip is:
nope_btn.addEventListener(MouseEvent.CLICK, cancelunloadexitb);
yep_btn.addEventListener(MouseEvent.CLICK, unloadexitb);
function cancelunloadexitb(e:MouseEvent):void {
    var snd:sound1 = new sound1();
    snd.play();
    this.parent.removeChild(this);
function unloadexitb(e:MouseEvent):void {
     var snd:sound1 = new sound1();
    snd.play();
    I NEED CODE HERE
function errorF(e:IOErrorEvent):void{
trace(e);
Any ideas?

If that code is inside the alert_mc object, then you can try...
function unloadexitb(e:MouseEvent):void {
     var snd:sound1 = new sound1();
    snd.play();
    MovieClip(parent).gotoAndStop(6);
    MovieClip(parent).removeChild(this);
Another way to do it would be to just have the alert_mc dispatch an event that you assign a listener for in the main, and have the main event handler function for that listener deal with removing the child and moving on its own timeline.

Similar Messages

  • Removing attached clips

    I have code that attaches a number of movie clips using an
    array as the variable name. I would like to remove these clips when
    I press a button. I have attach my code to create and remove the
    clips. The create function works just fine but the remove when I
    press the button doesn't work at all. Can someone tell me where I
    am going wrong?
    Thanks

    I am afraid that doesn't seem to work either. I can do
    anything else I want to the clips, just not remove them.

  • Need to remove video clip and save audio track.

    We are trying to remove a segment of video clip and save the audio track that goes with it.    We intend to fill that open segment with transitions of still photos, all the while allowing the narrator, who has now been "clipped" to keep speaking.
    We are using CS3 Premier Pro.
    Any advise would be greatly appreciated!   Thanks for your wisdom...
    Mary M.
    Yellowstone National Park.

    Mary,
    I find that just Alt-clicking on the Video and hitting Delete to be the quickest method. That does exactly the same as Unlinking, with two keystrokes - Atl-click Video, Del key.
    Hope that helps,
    Hunt

  • In actionscript 3.0 how do i make a nested movie clip button go to a frame on the main timeline

    I am making a website based in flash actionscript 3.0 i have a button nested in its own movie clip, because I have the button expanding to be able to read it i have figured out the only way to do this is by creating it as a movie clipa nd inside the movie clip creating it as a button
    I added an event listener to the blog button by saying,
    blog.addEventListener(MouseEvent.ROLL_OVER,gotoblog);
    function gotoblog(evtobj:MouseEvent){
         gotoAndStop(2)
    this part of the code works it goes to the 2nd frame of the timeline it is in and stops wich is a blown up version of the origanal symbol
    i added on frame 2 a second command
    blog.addEventListener(MouseEvent.CLICK.gotoblogpage);
    function gotoblogpage(evtobj:MouseEvent){
    gotoAndStop("blogframe")
    trace("the blog button was clicked")
    i have named the symbol blog and have name the frame of where the blog page is going to be "blogframe" this line of code at the bottom is where i run into trouble the output window in Flash is saying "The blog button was clicked" just like i want it to. no errors are accouring why than is the playhead not going to frame "blogframe"? if the button is working when i click it the code is right i belive the problem here is it does not want the playhead to go to the frame i want it to. So i gues my question is, how can i make a button withing a movie clip interact with the main timeline?

    I have a similar problem if could please help me i'd really apreciate it!!
    So i have a looping animation of some thumbnails, the hierarchy goes like this
    Scene1(main timeline) -> imgBar(MC)->imgBarB(MC within the imgBar MC)
    My buttons symbols are in the last MC "imgBarB" where i have this code:
    ss1.addEventListener(MouseEvent.CLICK, OneButtonClicked);
      function OneButtonClicked(event:MouseEvent):void{
      MovieClip(root).gotoAndStop("ssbox1");
    I want to control the Btns in my "imgBarB" MC to play a labeled frame(named "ssbox1") on another MC on the main timeline,this other MC goes like this:
    Scene1(main timeline)->ssbox_mc(MC where my labeled frame is)

  • Removing attachements, change and issues

    Since this latest system update (Mail 8.2 (2098)), removing attachments suddenly NO LONGER puts the old copy in the trash. It doesn’t seem to go anywhere.
    I need this capability as, often, when deleting attachments, the mail message turns to complete garbage. Now there is no way to get it back!!
    [I would also love it if someone could address that problem, too, where you simple get a whole bunch of gobbledegook like "嗁鏉欕Z嗃iz��拽�<﹜�'甸��妆辐m歐!j�����厢y≤潑�-蔠�聤萋订n窔� +t7毈…" right after selecting 'remove attahments' on a message (from the menu).

    Actually, the initial problem still exists! [I thought it was solved but then realized it was on a computer where I had not updated the System software to 10.10.3. I simply can not see where it tosses the original message with the attachment -- maybe it just discards it. Again, I need to get these back as a LOT of the time, removing an attachment turns the message into hellish nonsense (as above).
    I would still love a solution to both issues. [Or is the problem uniquely mine? -- doesn't seem like it given that it is a problem on all 4 of my computers, same mail, obviously.

  • Going Back to the main frame, from inside a movie clip time line.

    In flash CS5 I want to go back to the main time line, from inside a movie clip button, so when i click the the movie clip it goes to another frame on the main time line..
    Can anyone help me?
    Thanks
    Daniel Derrick

    your can use _root to reference the main timeline from anywhere though that can lead to problems if your swf is loaded by another swf.  because of that eventuality, it would be better to use a relative path back to the main timeline.
    so, from a movieclip's timeline (when the movieclip is on the main timeline), you can use _parent to reference the main timeline.
    but even better would be to use no code on that movieclip's timeline and keep all your code on one timeline (the main one).

  • Remove duplicate clips through array

    I'm using beneath code to two areas of clips. On the left 10 clips consisting of 2 columns and 5 rows. On the right the exact duplicate. It starts of with clip 1 on the left, than it's duplicate on the right, then clip 2 on the left, than it's duplicate on the right etc. Until both left and right have the exact same 10 clips in the same order.
    Now I've added an event listener. The way I would like it to work is when I click e.g. clip 4 on the left, not only that clip should be removed, but also it's counterpart clip 4 on the right. And the same the other way: clicking clip 4 on the right should remove both the right clip 4 as the left clip 4.
    The way I've got it working now is only when clicking clips on the left. That removes that clip and the clip on the right. I'm using the indexOf array way for that. By deleting the clip on that indexOf location, which would be a left clip and the clip on the right by adding 1 to that indexOf. Since in the array the right clip (duplicate) immediately follows the left (original) clip.
    Of course that doesn't work the other way, when I click a right clip first. Since I then would have to subtract 1 of the indexOf location to get to the left clip version. But I can't think of a way to determine whether the clip clicked on is on the right area or the left. I've commented that second removeChild line since that doesn't work when clicking on a right clip.
    Can anyone thing of a way?
    var clipcopies:Array = new Array();
    for (var rows:uint=0; rows <5; rows++)
              for (var cols:uint= 0; cols <2; cols++)
                        for (var cops:uint=0; cops <2; cops++)
                                  var persona:clips = new clips();
                                  persona.scaleX = .5;
                                  persona.scaleY = .5;
                                  persona.gotoAndStop(cols+1+rows*2);
                                  persona.x = (cols * (persona.width+20) + 10)+(cops*300);
                                  persona.y = (rows * (persona.height+20) + 10);
                                  persona.addEventListener(MouseEvent.CLICK,clickPersona);
                                  addChild(persona);
                                  clipcopies.push(persona);
    function clickPersona(e:MouseEvent):void
              var thisclip:uint = clipcopies.indexOf(e.target);
              trace(thisclip);
              removeChild(clipcopies[thisclip]);
              //removeChild(clipcopies[thisclip+1]);

    If I've understood your code correctly, clips on the left will have even numbered indexes or 0 as their index.  Clips on the right will have odd numbered indexes.  I would try:
    var clipcopies:Array = new Array();
    for (var rows:uint=0; rows <5; rows++)
              for (var cols:uint= 0; cols <2; cols++)
                        for (var cops:uint=0; cops <2; cops++)
                                  var persona:clips = new clips();
                                  persona.scaleX = .5;
                                  persona.scaleY = .5;
                                  persona.gotoAndStop(cols+1+rows*2);
                                  persona.x = (cols * (persona.width+20) + 10)+(cops*300);
                                  persona.y = (rows * (persona.height+20) + 10);
                                  persona.addEventListener(MouseEvent.CLICK,clickPersona );
                                  addChild(persona);
                                  clipcopies.push(persona);
    function clickPersona(e:MouseEvent):void
              var thisclip:uint = clipcopies.indexOf(e.target);
              trace(thisclip);
              removeChild(clipcopies[thisclip]);
             if (thisclip % 2 > 0) // then thisclip is an odd uint - ie clip is on the right
                   removeChild(clipcopies[thisclip-1]); // remove the clip on the left
              }else{  // then thisclip is an even uint - ie clip is on theleft
                   removeChild(clipcopies[thisclip+1]); // remove the clip on the right

  • Imovie11 splitting clips and freeze frame problems

    I am having a problem with imovie11 splitting cips and using the freeze frame function.  When I highlight the clip I want split, it splits a different clip either on the line below it or somewhere else in my project!  Also, my freeze frame function freezes the frame where my playhead is BUT doesn't split the clip...so what I'm left with is the entire clip- then the freeze frame - then the continuation after the freeze frame.  Is there a fix for this??

    Remove any in or out points you have on the timeline. Place the playhead at the frame on the timeline you want to freeze, and then select Modify > Make Freeze Frame, the freeze should appear instantly in the viewer. You can then click the Overwrite button, and the freeze should now be placed on the timeline in the correct place.
    Is this not happening?
    MtD

  • Remove Advanced Pulldown and Duplicate Frames

    I've been researching this but still have not figured it out:
    When I import Canon XF100 footage shot in 24fps from my CF card into FCP 7, in the "Log and Transfer" window under "Preferences", should I check or uncheck "Remove Advanced Pulldown and Duplicate Frames"?  My thought was to uncheck the box since it is a function specific to P2 cards and that it wouldn't make a difference either way for my footage.  Also (and I could be wrong), I didn't think any pulldown was necessary since I was shooting in 24fps.  However, when I examined 2 test clips taken through both paths, there was one noticeable difference: the unchecked clip is larger (644.8MB) than the checked (582.8MB).   Hmmmm....
    Does this mean the footage changes based on if that box is checked or not? 
    And in my shooting/import scenario, should I check or uncheck that box?
    Thank you.

    23.98 and 23.98
    > I have a few different cameras and some need pulldown and some don't but I've always left it checked under the > assumption that if there's nothing to pulldown it can't/won't and everything has been fine.
    good to know.  i agree.  based on my conversations with the canon xf software folks, they were not entirely sure whether or not to check the box, so it doesn't seem to be a significant impact on the work flow.
    thanks all for your input.

  • Can anyone help me figure why there is a popping sound when I move from an iphoto still image to a new video clip?  The sound has been removed from the video clips and there is another soundtrack underneath it all.  Help?

    My current project is like many I have created in the past.  I have removed the sound from my video clips and laid another soundtrack under the entire project.  Now, when I add an iphoto still image to the project, when it goes back into video there is a popping sound.  I've never had this happen in the past and have made many projects in the past just like this one.  Any way to troubleshoot this issue?  Thanks so much for your help.
    Ben

    What audio output are you using? What mac and version iMovie

  • Is this a bug?: copied movie clip has wrong frame rate and ruins the main movie's sync

    Hello,
    I am trying to copy a movieclip with a frame rate of 30 frames per second to a movie that has a frame rate of 30 frames per second. Both movies are actionscript 3 movies. When I do this, my copied movie clip's frame rate reverts to 12 frames per second and all my audio synched animation is trashed. Then when I change it back manually to 30 frames per second it makes my main movie's stage animation go crazy at full possible speed and the audio is all out of sync. I have not set export for sharing or action script on this movie clip. I've tried other movie clips that are 30 frames per second and it is all crazy!
    Is this a bug? What can I do? I've got 100s of movie clips I need to make. I can't keep remaking them just because flash has a screw loose. I'll go crazy!
    -theGibler

    Oh sorry I goofed! My main time line is 12 fps! I can't belive I didn't see this before.

  • Can an InCopy editor add, remove and edit a text frame placed inside the main story text frame?

    I think I already know the answer to this which is - no. I'll explain why I am asking the question in a second, but the reason I think the simple answer is no is because - text frames are controlled by a designer in the layout file, an editor using incopy can only edit the text and images placed inside text frames, and so cannot resize them, add or delete them.
    Ok, so the reason I have asked this.
    Is there a way around this so that editors in incopy can edit certain types of text frame that are contained within the main text frame? I'm using these text frames to contain specific paragraph styles, giving them a boxed look and also with an anchored icon in the top left of the text frame depending on the type of paragraph it is. See screenshot as an example of a green text frame that I am using to contain paragraphs of type "tip".
    If it is not possible for editors in incopy to add, edit or resize these text frames (green tip frame in the example above), then how else can I style these paragraphs to give the same visual appearance, but without the use of wrapping them in a text frame?
    One (not so good) way around this is for the designer to add the text frames in the layout file after he gets the content back from the editor, then moving the "tip" paragraphs into these newly created text frames. However when the editor updates the content in incopy and gets these new text frames in their copy, they can not then delete them if they wish to, or if they add or reduce content inside of these green text frames then the frames dont grow to fit their edited content. So I dont think its a solution for the designer to control the adding, removing and resizing of these frames.
    UPDATE: I have just discovered that once a text frame has been placed into the document by the designer and the editor updates their copy in incopy-  they can then use the "Position Tool" to select that text frame - allowing them to resize it, or delete it! Fantastic. But would the editor be able to add these frames in themselves to begin with? Maybe have a document containing all of the objects available to them, copy and paste one of them into the main document and edit its content? Does anyone have any advice on how to go about this? Essentially I would like the editor to control the insertion, editing and removal of these inline text frames.

    True. But when all I am trying to achieve is a border around a paragraph, use of a table seems overkill to me. But if thats the only solution I have so far then I will have to go down that route.
    It would be useful to have an object libraries panel in InCopy so that editors can drag across predefined text frames into their doc via InCopy, but I cant see that option in InCopy. is there one? I have also thought about exporting the frames as seperate InDesign Snippets and saving them to an objects folder, then when an editor needs to insert one into their doc they simply use File > Place > "Choose required text frame snippet". However I have found that InCopy can't place InDesign snippets so that theory was a failure. Is there another format I could use to save the objects and bring them into InCopy? List below shows my findings so far for trying to save/export a text frame from InDesign and then import into InCopy:
    InDesign Snippet (.idms) - can't import into InCopy
    InDesign Document (.indd) - imports content as an image - only editable in InDesign
    InDesign Template (.indt) - imports content as an image - only editable in InDesign
    InDesign Library (.indl) - can't import into InCopy - no panel available in InCopy for object libraries (that I can see...)
    InCopy Markup (.icml) - only imports the text, loses the text frame

  • Using Flach CS4 and action script 2.0 how do I advance to a specific frame of the main timeline when a movie clip instance come to the end of its timeline?

    Using Flach CS4 and action script 2.0 how do I advance to a specific frame of the main timeline when a movie clip instance come to the end of its timeline?

    code on the last frame of your movieclip instance:
    _root.gotoAndStop('whatever_frame');  // will work unless this swf is loaded into another swf.  in that situation, you should use a relative path to the main timeline (eg,  _parent or _parent._parent etc).

  • Difficulties with movie clips and frames

    This is really irking me.
    I am extremely new to Flash so please bear with me. I am assuming that this is a simple, easy to fix problem that I am having. I have Adobe Flash Professional CS5.5.
    What I am trying to do is display a sequence of images after other movie clips stop playing.
    The image sequence itself does what it is supposed to and works properly, and the other movie clips also are successful. However, whenever I try to put the movie clips for the images in frames or keyframes, the beginning movie clips only play part of the way before the images show up. This happens even though the images' movie clips are on frames/keyframes (I've tried both) after the other movie clips.
    The movie clips that are supposed to play first are each on a separate layer and there are two of them.
    The first layer is called "tree" and the second is called "text"
    The tree layer has a 45-frame gif animation that I have turned into a movie clip. I have created a motion tween and changed its alpha so that the gif has a fading in and out effect. I also have it so that it stops replaying once it reaches the last frame. I am using stop(); for this.
    The text layer has a 40-frame gif animation that I have also turned into a gif. This gif is also a movie clip and also has motion tween. Its alpha has also been changed.
    Both tree and text play together successfully and how I want them to.
    The sequence of images is three separate images, each a different layer, that fade into eachother. These images are pngs, therefore they aren't gifs nor do they have their own frames.
    The bottom layer is called floor1 and has frames 1 through 50 of motion tween and alpha adjustments fading the png image. The image is a movie clip.
    The layer on top is called floor2 and has frames 51-100 of a different png image fading.
    The very top layer is called floor3 and has frames 101-150 of yet another png fading.
    The images are successful in doing what they are supposed to.
    Layers tree and text are one fla file, and layers floor1, floor2, and floor3 are a separate fla file.
    When I copy the frames from layers floor1, floor2, and floor3 into a keyframe after layers text and tree, they transfer properly, but when I test the animation, the image sequence shows up a lot sooner than it is supposed to, interrupting the movie clips on the layers text and tree. I have tried moving the floor# layers' keyframes farther down the timeline, but then the other movie clips just stop.
    In the fla file with layers text and tree, I've imported the gifs into the library and then put them onto the stage.
    In the fla file with the floor# layers, I've imported the pngs into the stage.
    Here's what the text and tree layers look like:
    Here's what the floor# layers look like:
    The rest of the frames for the floor#s...
    So, I thought that the problem was that I needed to delay the image squence. I looked around and found no code or anything for that..
    Afterwards, I thought that it was because I had imported the tree and text gifs to the library before putting them on the stage.
    I opened a new fla and imported the "tree" gif straight to the stage.
    I figured that this should work because then it would show each of the individual frames in the movie clips, which it doesn't do in the above pictures. By importing the gif like this, it does show the individual frames. I've tested this with the image sequence and it works fine. But I have a problem with this method too..
    I select all of the frames for the gif to convert into a symbol, so I can add a motion tween and mess with the alpha. However, only the last frame is converted into a movie clip. Well actually no... Only the circled frames below are turned into the movie clip. Even when all of the frames are selected.  This isn't very helpful because then I can't change the alpha for the entire gif nor can I create a motion tween without getting a message saying that the motion tween could not be applied to all of the frames.
    Here's what this version of "tree" looks like.
    And the frames continue like so until 135.
    The frames that are turned into the movie clip are circled below.
    If I can solve the issue that I'm having with the tree shown in the two pictures above this sentence, then I can display the movie clips and image sequence without a problem. It wouldn't be quite how I had intended it to be, but it would be successful and would still work.
    If I can fix the problem with the image sequence showing up to early, and of the tree and text movie clips being cut off, then this project would also be successful and it would be how I had wanted it to be.
    If you need clarification, let me know and I'll explain something better.
    I am not willing to provide a download link in this forum for my fla files, but I can email them to you if you would like a look. I just don't want someone to be able to find them and take them by doing a google search.
    I have uploaded two swfs though.
    The first is of the tree and text layers/movie clips working as they are supposed to. The second is of the image sequence (floor1, floor2, floor3) doing what it is supposed to.
    Text and tree: http://glassoliverdesigns.weebly.com/uploads/1/0/6/5/10653451/tfg1.swf
    Floor1, floor2, floor3: http://glassoliverdesigns.weebly.com/uploads/1/0/6/5/10653451/tfg2.swf
    Notice how at the end of the text and tree swf, when the text stops the thing in the background keeps flashing. If that can keep flashing WHILE the images appear, then that would be great.
    TL;DR: I want the floor# flash to show up after the text and tree flash but I keep having problems and nothing I try is working properly.

    Very concise question, appreciate the screenshots. One thing that motion tweens don't always show very well is keyframes. Let me clear a few things up and see if it helps.
    Go back to what you wanted to do originally, which is copying the frames from one document to another. This is perfectly fine and to clear it up, it will also copy any library elements (images, clips, etc) that are required to copy those frames for you, so you do not need to import them yourself.
    To successfully copy frames (not symbols), select the first frame of the frames you want to copy, hold shift and select the last frame (alternatively double clicking anywhere in the blue motion tween should select it all as well). Now right-click and "Copy Frames". Now go into your new document, select a frame, right-click and select Paste Frames. You will see the same frames copied over, the blue representing the tween and keyframes came with it and you finally will notice all your images/etc were copied into your library.
    Now is a good time to manage the library clutter that was just copied in, if you're a clean freak like me.
    This process is the same, as you tried, for the other documents you want to copy in. If any resources match in name then Flash will ask you if you want to "overwrite" that library item. If you do that,  you will break one of your previous animations. Make sure that's not the case.
    The common gotcha here is not knowing how to slide frames over properly. If overwriting isn't the issue, this is what I suspect your problem is and as you expand/contract the timeline the keyframes aren't going with you.
    For example if I import 2 clips with fade in/out and move keyframes as you did I'll get something like this:
    Now moving them over I would be very careful to select all of the frames I want to move via the methods above. Click the first frame, hold shift and select the last frame, or double-click anywhere in the middle of the blue. The selection of frames:
    Now I simply drag my selected frames to the right, notice the keyframes stay as they should (the black dots):
    The animation plays as expected.
    Lastly I'm not sure if you've ever used the panel but you should really get used to the Motion Editor. This gives you control over easing as well as shows you an in-depth view of the keyframes that exist in a selected motion tween.
    At first this panel may look complex but it simply represents the basic properties you can animate. Any more properties you animate can be added in here. I moved the X, Y and Alpha properties of my object. So you can see over the frames 30-60 what I did. You can also adjust basic easing here.
    If your animations don't look correct you can select a motion tween, open the motion editor and verify the keyframes look correct. Scrub the timeline and look at the values you're interested in. Alpha for example, for you.
    If you don't see any keyframes when you scrub the timeline, you moved your frames over incorrectly and the keyframes probably exist in a different place and therefore it appears incorrect.

  • I usually remove my earphones and shut down the nano.  When I attached the earphones it automatically turns on. Any solution?

    I usually remove my earphones and shut down the nano.  When I attached the earphones it automatically turns on. Any solution?

    You have 10.6 on that machine, I suggest you stick with it for performance, third party hardware and software reasons as long as possible.
    Consider 10.8 (not 10.7) when it's released, because 10.7 and 10.8 will require a new investment in software and newer third party hardware as it requires newer drivers the old machines won't have. (forced upgrade because of software, really nice of them)
    http://roaringapps.com/apps:table
    Far as your Safari problem do these things until it's resolved:
    1: Software Update fully under the Apple menu.
    2: Check the status of your plug-ins and update (works for all browsers) also install Firefox and see if your problems continue. You should always have at least two browsers on the machine just in case one fails.
    https://www.mozilla.org/en-US/plugincheck/
    Flash install instructions/problem resolution here if you need it.
    How to install Flash, fix problems
    3: Install Safari again from Apple's web site
    https://www.apple.com/safari/
    4: Run through this list of fixes, stopping with #16 and report back before doing #17
    Step by Step to fix your Mac

Maybe you are looking for