Tileable Skins/Textures?

When making rectangles, is there a way to skin it so that the texture is the largest possible in the body, and then tiles?

for example, look at this image:
Image

Is this possible? Also, the skin doesn't have to end perfectly with the end of the object, it can be cut off.
Does anyone have any idea of how to do this?
Although some people here probably know (not me), I think you are asking the wrong forum.
irresistible force wrote:
Although some people here probably know (not me), I think you are asking the wrong forum.


Where would I post it then?

I have an idea that I could take the movieclip and draw it to a BitmapData then do a Bitmap Fill on it. But not quite sure how to do it.
It seems like a Flash question, there must be some Flash forums around somewhere.
It appears that what you're doing is making a bitmap that is (for example) 64x64 and simply stretching it by either setting its width or its scaleX property after the fact. What you'd do instead is create one single bitmap that is not scaled in any way. You'd then use two different bitmapdata objects. One of them is a "palate" that contains the original artwork and the other is the "canvas" to which you'll paint the artwork from the palate. The bitmapData class has .draw(), .copyPixels(), and other such functions that allow you to copy from one drawable object to another.

The AS3 docs are a reasonably good resource for this. Another reasonably good source (much more detailed, but with incredibly bad copy editing) is the book by the 8bitrocket people "Essential Flash Games."

Original thread: https://box2d.org/forum/viewtopic.php?t=5809