Questions about making dress-up games in Flash
October 14, 2008 11:44 AM
Subscribe
I draw paper dolls, and I would like to be able to make a dress-up game in Flash out of them. I can find tutorials about making simple dress-up games easily enough, but I have two questions that none of the tutorials seem to answer: one about linked layers and one about "snapping" the outfit in place.
Is there a way to link two layers together such that they can be dragged together, but one layer goes over the doll layer and one layer goes under the doll? For example, look at
this image's headdress. The fabric goes both in front of the face and behind the head, so ideally that'd be two different layers stuck together.
Is there a way to "snap" the clothes to the doll? (I hate trying to get them just right, myself.) If so, is there a way to control how close you can be before it snaps?
Thank you very much!
posted by shirobara to technology (11 comments total)
3 users marked this as a favorite
If (the difference between center of part's X coord and destination's X coord) is less than (tolerance) AND (the difference between center of part's Y coord and destination's Y coord) is less than (tolerance), then set the location of part to destination.
Like that, but sub in your own values and wrap it in Actionscript. :)
posted by rokusan at 12:09 PM on October 14, 2008