A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Move MC on button click?

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Posts
    6

    Move MC on button click?

    I have been trying to figure this out for about 2 days now! It seems so simple, but I can't get it to work. Hopefully I explain it well enough...

    I have a movie clip that houses portfolio images that scroll left or right depending on where your mouse is. In that movie clip, the portfolio images are buttons. The whole movie clip scrolls in the center of the stage. Well when you click on an image, I want the whole scrolling movie clip to move down to the bottom of the stage, thus freeing up room in the center of the stage to place a larger image.

    Hopefully this makes sense. I for the life of me can't figure out the code. I don't even really know where to begin, as it's been quite awhile since I have done AS.

    Thanks for the help, and I would be more than happy to answer any questions that may explain it better.

    Don

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    356
    This might be a rather crude way to do it, but it sounds like you need to place the scroller in a movie clip so it's tweened to go from the initial position to the lower position. Then your buttons would include the code to send the scoller movie [instance] to the lower position. How you get it back to center position would depend on some other factors that aren't clear in your description. Maybe when you 'Drag Off' or 'Roll Off' the graphic, the graphic shrinks and the scroller MC goes back to main position?

    It might help to upload a little test .fla of what your trying to do.
    Healthy Earth - Healthy Mankind - A Joyous New Millennium

  3. #3
    Junior Member
    Join Date
    Jun 2004
    Posts
    6
    Quote Originally Posted by Metrov8
    This might be a rather crude way to do it, but it sounds like you need to place the scroller in a movie clip so it's tweened to go from the initial position to the lower position. Then your buttons would include the code to send the scoller movie [instance] to the lower position. How you get it back to center position would depend on some other factors that aren't clear in your description. Maybe when you 'Drag Off' or 'Roll Off' the graphic, the graphic shrinks and the scroller MC goes back to main position?

    It might help to upload a little test .fla of what your trying to do.

    Yup, that's what i'm trying to go! I am attaching a sample of my scroll bar. I just want it to slide down when you click on one of the buttons. And as I said, I am no AS whiz, so things may be a little sloppy or wrong!

    Thanks so much!
    Attached Files Attached Files

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    356
    This is a down and dirty sample. You'll see I put the movie you had on stage into another movie, and gave it an 'instance name' [very important]. Then I put some code in the 'Sky' button only, that tells that movie [on the _root] to play.

    Then in your graphic, you'll need a button to tell that same movie to go back to it's original position.

    I doubt if this is exactly what you wanted, but it should get you started in understanding what you have to do. Hope it helps.
    Attached Files Attached Files
    Healthy Earth - Healthy Mankind - A Joyous New Millennium

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