Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Scripting Languages (http://www.programmingforums.org/forum39.html)
-   -   Flash Actionscript - Scrolling an object with set marks. (http://www.programmingforums.org/showthread.php?t=2397)

TerraNerd Feb 22nd, 2005 1:51 AM

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.


All times are GMT -5. The time now is 4:28 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC