gildan2020
asked on
scroll image & text within a small boundary
hi, i've an image which i wanna put within a small rectangle (boundary) for scrolling. the boundary is very much smaller than the size of the movie (small box). the reason i'm doin dis is to scroll a text with pics in it.
somehow, the examples i see out there uses boundaries as big as the screen, which isn't wat i wanted, bcos the image should be seen only inside dat small rectangle, especially when scrolling it. plz help.
gildan2020
somehow, the examples i see out there uses boundaries as big as the screen, which isn't wat i wanted, bcos the image should be seen only inside dat small rectangle, especially when scrolling it. plz help.
gildan2020
ASKER
yup, i've thought about doing MIAW, which is a good idea...
but how do i use imaging lingo? can u explain further?
is it possible to have a scrollbar with it?
gildan2020
but how do i use imaging lingo? can u explain further?
is it possible to have a scrollbar with it?
gildan2020
Sure. The basic idea is to use a small bitmap on screen as sort of a viewer for a small part of a larger image. Fisrt create the larger image. Use a new image object to composite the text and image together into one image. Then we set the scroll...
scrollH = 0
scrollV = 0
so if we scroll 10 pixels left then scrollH = 10, and if we scroll 20 pixels down then scrollV = 20 so we cna copy this part of hte image in...
member("viewer").image.cop yPixels(co mpositeIma ge, member("viewer").rect, member("viewer").rect.offs et(scrollH , scrollV))
This copies that chunk of the main image into the viewer member. THere are custom scrollbar behaviors at www.mediamacros.com that can be tied in or you can use an Xtra like OS Control to get OS level slider bars.
scrollH = 0
scrollV = 0
so if we scroll 10 pixels left then scrollH = 10, and if we scroll 20 pixels down then scrollV = 20 so we cna copy this part of hte image in...
member("viewer").image.cop
This copies that chunk of the main image into the viewer member. THere are custom scrollbar behaviors at www.mediamacros.com that can be tied in or you can use an Xtra like OS Control to get OS level slider bars.
ASKER
hmm...u said "Use a new image object to composite the text and image together into one image", are u saying dat i've to create an image which will house both my text and images? so, i'll b just scrolling an image instead, right?
if so...
member("viewer").image.cop yPixels(co mpositeIma ge, member("viewer").rect, member("viewer").rect.offs et(scrollH , scrollV))
if i'm not wrong, dis viewer member should actually be an empty image where da pixels from my composite image is transfered into dis viewer, right?
but, where would i put diz codes in? should i put it into a custom scrollbar lingo?
can u provide me with an example of an image scroller with slider bar?
gildan2020
if so...
member("viewer").image.cop
if i'm not wrong, dis viewer member should actually be an empty image where da pixels from my composite image is transfered into dis viewer, right?
but, where would i put diz codes in? should i put it into a custom scrollbar lingo?
can u provide me with an example of an image scroller with slider bar?
gildan2020
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hmm...i'll probably need a lot of reading, thx 4 ur help
gildan2020
gildan2020
NP. Ask if you get stuck in the process. :)
1. Use imaging lingo. By getting the image of the text and the image of hte bitmap you can create a larger image object in RAM, then as you "scroll" use copy pixels to copy that portion of the image to the bitmap on the stage.
2. Use a MIAW. You can open this in another Director window and set the drawRect of that window to "scroll" it.