|
Flash Actionscript - Scrolling an object with set marks.
Here's the digs. This is all theoretical:
Say i've got an image, that is 200x800. It is comprised of four 200x200 images. I've put a 200x200 mask over it, so it can only fit/view one image at a time. I have 4 buttons under the mask/image. Each button represents an image in the larger collage-image, 1, 2, 3, and 4. I want to be able to press a button and go to the corrispoding image. (if i press 3, the larger image will shift over so only the third image is showing through the mask, and if i press 1, it will shift over so only the first image is showing, you get it...)
The 'marks'
When i say 'marks' i mean i want 4 set _x positions of the larger image. The first mark representing the _x position that the large image will need to be at so the first image will show. The second position will represent the _x position of the larger image so that the second image will show, and so on.
Why am i doing this? I want to be able to be able to press a button and have the large image move to the corrispoding 'mark.' If i press the third button, i want to code it so its could basically say "Move the _x position of the big image to the third 'mark'." Hopefully that makes sense.
I've converted the 200x800 image to a movie clip, named 'mc' and given it an instance name of 'mc.' I now want to set the marks, but flash is slightly retarded when it comes to units-of-measurement. Because of the vecter, I cant measure in pixels, so i can't easily map out in 200 pixel increments the four marks like you think would be easily doable. So here's one of the problems. I need to figure out how to 'place' the marks. I dont know how to approach this. I wish i could move the large image along the x axis and 'capture' the _x position when it lines up, or something similar.
I dont know how to further explain the 'mark' thing.
I know this is a farely simple project, and i've figured out things 10 times more complicated then this, but the logic isnt clicking. Thanks for any help.
__________________
[See a gallery of my Graphic art Here.][Visit my website Here]
|