A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Any way to scroll the content inside a movie clip with buttons?

  1. #1
    Senior Member
    Join Date
    Apr 2002
    Location
    Atlanta
    Posts
    103

    Any way to scroll the content inside a movie clip with buttons?

    I have a big problem. I have a series of images (movie clips) inside a container movie clip.

    I need to somehow scroll those images within the clip left and right with buttons rather than a scroll bar.

    How might you suggest handling this operation?

    Any help is greatly appreciated.

  2. #2
    Senior Member
    Join Date
    Jan 2009
    Posts
    208
    presuming the images are all the same width, each button click should tween or just move the whole container left or right by that ammount and desired spacing as well...

    whats the big problem about that ? :P

  3. #3
    Senior Member
    Join Date
    Jan 2009
    Posts
    208
    presuming the images are all the same width, each button click should tween or just move the whole container left or right by that ammount and desired spacing as well...

    whats the big problem about that ? :P

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Location
    Atlanta
    Posts
    103
    Well, getting the container to stop at a certain point... so if I keep clicking either the right or left button eventually it's going to "fall off" the sides of the stage and keep going into the Ether.

    BTW, might not be a big problem to some - in fact I know it But I'm not quite there.

  5. #5
    Senior Member
    Join Date
    Apr 2002
    Location
    Atlanta
    Posts
    103
    ...or maybe I'm just missing the extreme obvious.

  6. #6
    Senior Member
    Join Date
    Jan 2009
    Posts
    208
    well obviously you need to set the bounds.

  7. #7
    Senior Member
    Join Date
    Apr 2002
    Location
    Atlanta
    Posts
    103
    regbolD - is that obvious to someone with little programming experience? I want to know for real, not being smarmy. I've been having a lot of issues with Flash like that.

    I'll do some searches for setting bounds.

  8. #8
    Senior Member
    Join Date
    Jan 2009
    Posts
    208
    so thats whats bugging you, how to set the bounds?
    well put a sketch on a piece of paper and everything should be clear to you.
    if you content.x is at 0 (wheather you using stage, or other movieclip and you maybe have a mask and you want to move away start of the content to the right) your previous (left in this case) button should be disabled or hidden, if you content is scrolled to the end, so if its at - content.width + stage.stageWidth (or whatever you are using) your next (or right button) should be disabled or hidden.
    something like that...

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