A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: dragging an mc and having something else move around the stage

  1. #1
    pixel punkazz
    Join Date
    Apr 2000
    Location
    over the hills and far away
    Posts
    73
    Hello
    I have a movie clip with a small image of a map and a movie clip within this one that has a rectangle to move over the map. This is set up to drag constraining to a rectangle so it stays within the small map clip. I need to have a large version of the map on the main timeline under the thumbnail that moves around according to where the user drags the focusing rectangle over the small map.

    Is this possible and if so what's the best way to do it?

    thanks

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    hello,
    The easiest way that comes to my mind is to make a duplicate of the big map and a duplicate of the big rectangle inside. and resize (scale) these into the "small map". The constrain should be the same for both rectangle (+200, -200 etc.) . set the _x and _y as global variable example:
    onClipEvent (enterFrame) {
    _root.checkx= this._x;
    _root.checky= this._y;
    }

    And now on the big rectangle this:
    onClipEvent (enterFrame) {
    this._x = _root.checkx;
    this._y = _root.checky;
    }

    You can put both vars on _root to check the positions.
    hope this helps
    gparis

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