movieclip.gotoAndPlay

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chunk1978
    New Member
    • Jan 2007
    • 224

    movieclip.gotoAndPlay

    ok... i've been trying to make this work for 2 days:

    i have a scene with a button and a movie clip. the movie clip is called "MovieClip1 ". within the movie clip i've labeled a frame late in the clip called "Near End". i want my button to make the playhead goto that labeled frame within the movie clip but it does not.

    the button has the following actionscript 2.0:

    Code:
    on (release) {
    	_root.MovieClip1.gotoAndPlay("Near End");
    	}
    what am i doing wrong?
  • nomad
    Recognized Expert Contributor
    • Mar 2007
    • 664

    #2
    Originally posted by chunk1978
    ok... i've been trying to make this work for 2 days:

    i have a scene with a button and a movie clip. the movie clip is called "MovieClip1 ". within the movie clip i've labeled a frame late in the clip called "Near End". i want my button to make the playhead goto that labeled frame within the movie clip but it does not.

    the button has the following actionscript 2.0:

    Code:
    on (release) {
    	_root.MovieClip1.gotoAndPlay("Near End");
    	}
    what am i doing wrong?

    try this instead
    on (release) {
    this.gotoAndPla y("Near End");
    }

    nomad

    Comment

    • chunk1978
      New Member
      • Jan 2007
      • 224

      #3
      Originally posted by nomad
      try this instead
      on (release) {
      this.gotoAndPla y("Near End");
      }

      nomad
      nope, doesn't work... i've tried this. _root.this.goto AndPlay("Near End"); _root.MovieClip 1.gotoAndPlay(" Near End");... nothing works... i'm wondering if i need to somehow change the properties of the MovieClip1 MC, so that actionscript can use it? i've called the MovieClip1 instance onstage "MovieClip1 " but it's just not being called.

      Comment

      • nomad
        Recognized Expert Contributor
        • Mar 2007
        • 664

        #4
        Originally posted by chunk1978
        nope, doesn't work... i've tried this. _root.this.goto AndPlay("Near End"); _root.MovieClip 1.gotoAndPlay(" Near End");... nothing works... i'm wondering if i need to somehow change the properties of the MovieClip1 MC, so that actionscript can use it? i've called the MovieClip1 instance onstage "MovieClip1 " but it's just not being called.
        is the MovieClip1 MC in the same scene?

        nomad

        Comment

        • chunk1978
          New Member
          • Jan 2007
          • 224

          #5
          Originally posted by nomad
          is the MovieClip1 MC in the same scene?

          nomad
          yes, it's in the same scene... i have no idea why something so simple is not working... it's making me crazy

          Comment

          • chunk1978
            New Member
            • Jan 2007
            • 224

            #6
            Here is a small FLA file which shows you what i'm trying to do:

            essentially there's an if/else statement block on the button, but the main timeline stops at frame 40.

            i'm trying to make the button direct the playhead to the "Red" frame label within the MC movie clip, but anyway i try to write it it just isn't working. i know i can do this by not making a MC in the first place and just use the main timeline, but this is a small example of a much larger project, so i have to have it work this way.

            so any thoughts of what i'm doing wrong?

            Comment

            • chunk1978
              New Member
              • Jan 2007
              • 224

              #7
              it seems my flash install is crazy... i switched my movie properties from AS2 to AS3, and then back again, and now everything works as expected... strange...

              Comment

              • Habbau
                New Member
                • Feb 2008
                • 2

                #8
                Hello...Chunk ..

                I did notice that you managed your problem, now am wondering if you could be kind enough to help me...

                I made a flash photo gallery with( thumbnail,xml). now the problems is that I have to implement zoom in / out buttons on in the gallery. How do I go about?

                thanks in advance!!

                (am a student, beginner with flash)

                Comment

                Working...