dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: on press start drag two movieclips?

  1. #1
    Member
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    56

    on press start drag two movieclips?

    Hi
    I have a magnifier made of two movieclips, glass_mc and handle_mc. The glass_mc is a mask revealing an image in a layer below.
    Now I want the handle to move like this:
    on (press) {
    startDrag(handle_mc, false);
    }
    on (release) {
    stopDrag();
    }
    But this only takes care of one movieclip. I want the glass_mc to follow as well as in:
    onEnterFrame = function () {
    handle_mc._x = _xmouse;
    handle_mc._y = _ymouse;
    glass_mc._x = _xmouse;
    glass_mc._y = _ymouse;
    };

    but in the on(press) and on (release) manner, where the hand grabs the movie clip anywhere.
    Can it be done with onMouseDown in some way? I just can’t figure it out.
    Hope someone can explain hove it should be done.
    /Borje

  2. #2
    Member
    Join Date
    Apr 2004
    Posts
    31
    have you got a fla to figure out what you want to do.
    also try with hittest method
    with that you can control the area for the hittest
    this way you can apply hittest method to the clip you want to drag when the mouse is press over and define the area of the first movie clip to control the hittest on the second movieclip...

  3. #3
    Member
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    56
    Here is an example how I want it to work, but with both MC moving
    Attached Files Attached Files

  4. #4
    Member
    Join Date
    Apr 2004
    Posts
    31
    sorry I've got invalid format
    I can't open it
    I'm on flash mx 2004 pro

  5. #5
    Member
    Join Date
    Mar 2003
    Location
    Sweden
    Posts
    56
    I am on a Flash MX (Mac). I think it should be possible to open it anyhow though, but newer mind. Couldn’t you please just give me an example of that hitTest script, on press start drag two movie clips simultaneously.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center