7 Replies Latest reply on Sep 2, 2010 5:09 AM by lulu13eyez

    Targeting a specific frame on a specific movieclip

    lulu13eyez

      Hi,

       

      I'm trying to get the following movieclip smallbutton to link to frame 5 on movieclip cont.

       

      The way the timeline is built is as so:

       

      content_mc > cont > (more mcs) > smallbutton

       

      This seems to be an issue from every answer I've tried so far since the movieclip "cont" is not being called in the main timeline; first there's content_mc and then comes cont.

       

      How would I go about getting the movieclip "smallbutton" to link to the 5th frame of movieclip "cont"?

       

       

       

      This is for AS 2.0

       

      So far I'm at:

       

      on (release) {
          _root.gotoAndPlay("cont");
          _root.smallbutton.gotoAndPlay(5);

       

      }

       

      Any help is greatly appreciated.

       

      Thanks.

        • 1. Re: Targeting a specific frame on a specific movieclip
          Ron Colmen Level 2

          I'm not very sure if I red you correctly, anyway try this on your smallbutton;

           

           

          //on your smallbutton

          on (release) {

              _root.content_mc.cont.gotoAndPlay(5);

          }

          • 2. Re: Targeting a specific frame on a specific movieclip
            lulu13eyez Level 1

            This doesn't seem to be working.


            • 3. Re: Targeting a specific frame on a specific movieclip
              ravich9

              I'm not sure if I read you correctly... try this...

               

              on (release) {

                   _root.content_mc.gotoAndPlay("cont");

                   _root.smallbutton.gotoAndPlay(5);

              }

              • 4. Re: Targeting a specific frame on a specific movieclip
                lulu13eyez Level 1

                This seems to make a bit more sense.

                 

                Although still not working.

                 

                What I want the code to do is call the content_mc from the main timeline and read frame 5 from the cont movieclip (which is inside the content_mc)

                 

                I believe I should put this code on the smallbutton movieclip. I'm not sure it's necessary to write "smallbutton" inside the AS code since it's already on the button. But I might be wrong.

                 

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

                The smallbutton movieclip has some code already on it like so:

                 

                onClipEvent (load) {
                    this.num = 1;
                this.hitArea = this.area;
                }
                on (rollOver) {
                    this.gotoAndPlay("s1");
                }
                on (rollOut, releaseOutside ) {
                    this.gotoAndPlay("s2");
                }

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

                 

                Maybe if we rearrange the code to something similar:

                 

                 

                on (release) {

                     _root.content_mc.gotoAndPlay("cont", "5");

                }

                 

                I tried but no success. Not sure what to do.

                • 5. Re: Targeting a specific frame on a specific movieclip
                  lulu13eyez Level 1

                  When I put in this following code on the button, when I click the button all that happens is is brings me right back to the "root" of the movie. So back it doesn't seem to read the "cont" movie clip or the 5th frame of that movie clip either.

                   

                  on (release) {
                      if (_root.READ != this.num or _root.READs != this.num and _root.animation == 5) {
                          _root.TM_title = "CONTACT US";
                          _root.READs = num;
                          _root.animation = 0;
                          _root.link_prev = _root.link;
                                  if (_root.link != 5){
                              _root.content_mc["item"+_root.link].gotoAndPlay("cont", "5");
                          }
                          _root.link = 5;
                          _root.play(5);
                      }
                  }
                  
                  

                   

                   

                  This is what I need to do:

                   

                  Once we click the movieclip entitled smallbutton which reads the following text: contact us

                  it will redirect to the "Contact Us" page which resides within frame 5 of the movieclip entitled cont

                  this last movieclip resides within the very movieclip entitled content_mc which resides on the main timeline.

                   

                   

                  So I would think something of the sort would work:

                   

                  on (release) {

                       _root.content_mc.gotoAndPlay("cont", "5");

                  }

                   

                   

                  But when I place this code on my movieclip, nothing at all happens.

                   

                  I hope all of this makes sense.

                   

                  I am really desperate to finding a solution to this. It's so aggravating how something that seems so very simple is instead so very complex.

                   

                  Any help is greatly appreciated.

                   

                  Thanks to those of you who have tried helping me figure this out already.

                  • 6. Re: Targeting a specific frame on a specific movieclip
                    Ron Colmen Level 2

                    I don't understand.

                     

                    Answer these,

                    1. Is this path correct - root > content > cont > (now on frame 5 you have your 'Contact Us' page).?

                    2..Where is the button with the instance name smallbutton reside (in the root? inside cont? etc...)?

                     

                    It would have been much easier if you post a mock-up of you fla.

                    • 7. Re: Targeting a specific frame on a specific movieclip
                      lulu13eyez Level 1

                      This is a template that was purchased. So kind of hard to move things around too much.

                       

                      1. this path is correct

                      2. scene 1 > cont > TM_track_mov copy 2 > TM_main_cont_page1 copy 2 > TM_page_content_scroll copy 2 > (this is where the smallbutton resides)

                       

                      I'd rename the movieclips to something shorter, but not sure if I should. Could it mess things up?