A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: myMovieClip.gotoAndPlay(frame)

  1. #1
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38

    myMovieClip.gotoAndPlay(frame)

    i don't understand...on the guide i'ts written:

    myMovieClip.gotoAndPlay(frame)


    but it doesn't work...

    i tried even

    _root.myMovieClip.gotoAndPlay(fotogramma)

    nothing....

    why????






    thanx

  2. #2
    Junior Member
    Join Date
    Jan 2003
    Posts
    10
    Are your sure your 'fotogramma' variable carries an integer of frame number? Thats might be the error.

  3. #3
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38
    Originally posted by hanky-93
    Are your sure your 'fotogramma' variable carries an integer of frame number? Thats might be the error.
    ooops...'fotogramma' means 'frame'

    i wrote:

    _root.myMovieClip.gotoAndPlay(10)

    myMovieClip is a mc that i exported for actionscript...




  4. #4
    Senior Member sofiebel's Avatar
    Join Date
    Feb 2001
    Posts
    1,044
    You have to give the movieclip an instance name in order to target it, so make sure it has one. In this case the instance name is "myMovieClip". Then you give the frame you want to go to a frame label name f.e. "myFrame".
    Using this code should work:
    Code:
    _root.myMovieclip.gotoAndPlay("myFrame");

  5. #5
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38
    Originally posted by sofiebel
    You have to give the movieclip an instance name in order to target it, so make sure it has one. In this case the instance name is "myMovieClip". Then you give the frame you want to go to a frame label name f.e. "myFrame".
    Using this code should work:
    Code:
    _root.myMovieclip.gotoAndPlay("myFrame");
    yes...i've made it!!!

    i really don't know why it doesn't work!

  6. #6
    Senior Member sofiebel's Avatar
    Join Date
    Feb 2001
    Posts
    1,044
    Can you upload an example of what you are doing?

  7. #7
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38

    Ok

    yessss.thank u a lot!!!
    Attached Files Attached Files

  8. #8
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38

    Re: Ok

    Originally posted by %20
    yessss.thank u a lot!!!
    strange...i tried to write

    onClipEvent (load) {
    gotoAndPlay(10);
    }

    and it works...i really don't know!

  9. #9
    Senior Member sofiebel's Avatar
    Join Date
    Feb 2001
    Posts
    1,044
    See if there's something you don't understand. I just did exactly as I explained to you above.
    Attached Files Attached Files

  10. #10
    Senior Member sofiebel's Avatar
    Join Date
    Feb 2001
    Posts
    1,044
    You're quite something! A simple instance name and gotoAndPlay you cannot manage, but a more compicated and harder to understand onClipEvent, you can...

    Anyways, I fixed it for you, but, indeed, you can just as well use the onClipEvent.

    But when you want to get better at flash it is important you learn how to things in different ways and also understand what the code you are using really does.

    Keep it up!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center