#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    2
    Rep Power
    0

    Question regarding Movie Clips and layers.


    Wasn't sure what category to put this in because I'm using Flash Professional 8. I only know the basics, but I can't find an answer to this question anywhere. I'm making a simple drag-and-drop style dress up game, and I want to know if it's possible to combine multiple movie clips on different layers so that they can be gragged as a single object in the game, but retain their seperate layers. For example, if I make a hat and I want the front part of the hat to be on a layer above the doll base's head, and the back of the hat to be on a layer behind it, but the hat has to move as a whole when dragged. Is there any way to do this? Thanks in advance.
  2. #2
  3. No Profile Picture
    Gotta get to the next screen..
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2003
    Location
    Legion of Dynamic Discord
    Posts
    6,678
    Rep Power
    3164
    Hi, you would have to stop using the startDrag and stopDrag events and instead switch to using a combination of onMouseDown, onMouseMove and onMouseUp events instead.

    So in the onMouseDown event you would assign the onMouseMove event. In the onMouseMove event you would set the position of the draggable objects to be _root._xmouse and _root._ymouse properties. Then in onMouseUp you would clear the onMouseMove event so things would stop moving.

    You can see the Adobe example of those events here.
    Quis custodiet ipsos custodes?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    2
    Rep Power
    0
    Thanks, that is exactly what I was after.

IMN logo majestic logo threadwatch logo seochat tools logo