4 Replies Latest reply on Feb 4, 2011 4:06 AM by Ned Murphy

    unable to removemovieclip!


      really new to here so go easy... and simple... like me!
      Sorry if i use the wrong terms!

      I have a Movieclip on stage, with this code on it, the movieclip loads  ok from the library as per the code, but after the two sounds have  finished i wish to remove the attached movie from the stage... i have tried even more  examples putting the removesection all over the code!, and my brain is  fried...

      please help, take pity on me...


      onClipEvent (mouseUp){
      var times = 0;
      function callback() {
      times ++;
      trace (times);
      _root.thumb.removeMovieClip("thumb", 0);
      _root.removeMovieClip("thumb" , 0); // tried even more combinations!

      if ((_root.arrowcardtotal.tharrow == "tharrow" and _root.arrowcardtotal.harrow == "harrow")
      and (_root.arrowcardtotal.tarrow == "tarrow" and _root.arrowcardtotal.uarrow == "uarrow"))
      {_root.attachMovie("thumb", 0, {_x:350, _y:200});

      number = new Sound (this);
      number.attachSound("well done");
      number.onSoundComplete = callback;
      number.start(0, 1);
      number1 = new Sound(this);
      number1.onSoundComplete = callback;
      number1.start(0, 1);
      _root.arrowcardtotal.tharrow = "";
      _root.arrowcardtotal.harrow = "";
      _root.arrowcardtotal.tarrow = "";
      _root.arrowcardtotal.uarrow = "";


        • 1. Re: unable to removemovieclip!
          Ned Murphy Adobe Community Professional & MVP

          See if changing to the following works (you didn't assign a name to the attached symbol)...


          function callback() {


          _root.attachMovie("thumb", "thumb", 0, {_x:350, _y:200});

          • 2. Re: unable to removemovieclip!
            Rothrock Level 5

            Also try attaching it at a depth higher than 0.

            • 3. Re: unable to removemovieclip!
              d56_jones Level 1

              Thank you, thank you...


              (i didn't assign a name to the attached symbol  "thumb", "thumb",)... not too sure exactly what that means at this time as it is early days yet for me but thanks so much...!


              Do you think before I get too involved in AS2 that I should start learning get and learn AS3 instead? I assumed that it would work like AS2 with more features but i am beginning to worry about learning AS2 and then relearning AS3 later?


              Any thoughts


              Once again... thanks


              Once you know you know!



              • 4. Re: unable to removemovieclip!
                Ned Murphy Adobe Community Professional & MVP

                Unless your job involves working with other people's designs where you might need to know AS2, go right to AS3.  You won't gain anything by suffering the learning curve of AS2 and then repeating similarly for AS3.


                You said... "not too sure exactly what that means at this time "


                One of the most impiortant things to learn before you learn the language is to learn how to use the tools that support it... namely the Flash help documentation (and Google as well).  If you were to look up the attachMovie() function you would see what is required for it.  And if you dump AS2 and go right to AS3, the documentation is much easier to reference/find things.  Most objects/classes have 3 things that define them and how to use them... properties, methods, and events... and the help documentation explains all of them.  Getting that concept absorbed on day one will be the best first step you can take in making yourself a Flash developer.


                You said... "Once you know you know!"


                It's nice when folks have the ability to know things after they encounter them and hopefully you have that ability.  There are quite a few that simply don't have that ability and never seem to learn, especially when they are handed solutions.  In learning this stuff there will be times when you want to pulll your hair out or lose sleep and similar episodes of self-destruction... usually, under these circumstances, the outcome of suffering the effort is... once you know, you know.