2 part questionHow To Creating A Mask with AS3? Scrolling Th

  • CStrauss
  • Graduate
  • Graduate
  • User avatar
  • Posts: 122
  • Loc: St. Louis MO. USA

Post 3+ Months Ago

I have 2 questions, I’m making a little xml gallery and want to do to things with it at the moment first I want to only mask 3 thumbs so only 3 out total thumbs show and want to create a mask with action script just not sure of the code in AS3 . Any one have a sample code that creates a mask a certain hight and width that I can place over my thumbnail holder to only display a certain amount of thumbs?

my next question is once I get my thumbs to display properly I want to make two buttons to scroll them left and right again not certain about the code. I think I’m on the right track with my thinking. Here is what I think.

If i have say 6 thumbs in a movie clip lined up horizontally and each thumb is 100 wide with a 25 pixel space between when the button clicked I just need to move the movieclip holding the thumbs 125 pixel right or left correct. And then set some min and max values so it doesn’t go pass the first and last thumb correct?

Again does anyone have sample code of scrolling thumbs like i described I can peek at to see how it all comes together?

Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • CStrauss
  • Graduate
  • Graduate
  • User avatar
  • Posts: 122
  • Loc: St. Louis MO. USA

Post 3+ Months Ago

I figured out the mask part after a few hours of serious searching google. but I'm still having problems with my scrolling buttons. My main problem is my thumb holder is created dynamically and I figured I try to use the width property to set the max and min bounds but when I run a trace statement on my thumb holder movie clip after its been added to stage it returns a value of 0 so im not sure that will work.

Any help on this to see how its done best would be appreciated. To restate the problem. My thumbnails get loaded in via xml so there can be a range from 1 to infinity depending on whats in the xml.

Each thumb is 100 pixels wide with a space of 25 between each thumb. So Im trying to go off that to create two buttons that will scroll them left or right.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.