both maps are rectangles right? when you move the inner rect, say your icon, once its topleft corner+width goes further than width of outter map the diff must be offsetted of the map width. Same <0 y and >height map.
So if you check and each corners of your inner map rect are included into the receiver map rect you do nothing. if not, you check the bounds and copypixel accordingly. you can do 2 things: check the pointsInRect or rects in rects, which are I beleive out of the box in Rectangle class or you make a bigger map where your icon is repeated 6 times. In last case, only check is to ensure the center image rect is always into the receiver rect. Its way less calcs, no copypixels. Yet not as nice as first one when it comes to beauty of code/practice Fabrice On Oct 18, 2010, at 10:26 AM, colouredfunk wrote: > Thanks for your reply Fabrice. Can you dumb down your answer slightly, > as I'm not 100% following :) > > > > On Oct 15, 4:40 pm, Fabrice3D <[email protected]> wrote: >> check if the four corners of "inner" map are included in receiver map, if >> not, use bitmapdata magic... where repeats makes wonders.. >> or simple copypixel where you repeat to opposite sides... >> >> Fabrice >> >> On Oct 15, 2010, at 4:20 PM, colouredfunk wrote: >> >> >> >>> Hi, >> >>> I have a sphere with an interactive material on it. I'm moving an icon >>> (mc) around the sphere, but at a certain point the icon gets cut off. >> >>> example of it can be found here >>> -http://www.funkyjunk.me.uk/ImagesForExternals/away3d/globe.jpg >> >>> I'm guessing it is where the opposite ends of the texture meet.. >> >>> Can anyone give me some tips how to avoid this? Or a workaround? >> >>> Many thanks
