Clip position relative to _root

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Clip position relative to _root

    Hi all

    I have a clip buried deep within other clips, and I want to find its _x and _y
    position relative to the _root clip. Is this possible

    e.g. I have clips A, B, C and D, all nested within each other. If I find the
    position of 'D' from within 'D', its 'D's position within 'C' that is returned.
    How do I return its position within _root
    _root.A.B.C.D._
    _root.A.B.C.D._y

    Thanks in advance
    Pete

    Pea Guest

  2. Similar Questions and Discussions

    1. DW8 messed my relative position layer behaviors
      I recently upgraded from MX to Studio 8. I have a website where I was using a series of "set text of layer" behaviors to write copy to a relative...
    2. relative vs abolute position with layers in liquidinterface
      :confused; Newbie here. I've got a 2 column table in an editable area of a page created from a template. In column 1 there is a roll over...
    3. need help positioning movie clip relative to a resizing clip...
      I am trying to attach a "caption" to the bottom right edge of a movie clip that resizes. I am using the resizing clip as a image holder for a...
    4. _root.sound1.position is wrong..
      I'm developing a winamp on in flash for my MP3's on the web, but found when I move from one MP3 to another the .position still holds the position of...
    5. Referring to a global variable in a clip from _root
      I know you can refer to global variables in the main timeline from a movie clip, but can you do the reverse--I can't seem to get that to work? For...
  3. #2

    Default Re: Clip position relative to _root

    on the timeline of the mc you want to know the absolute position of type
    pt = new Object();
    pt.x = 0;
    pt.y = 0;
    this.localToGlobal(pt);
    bigX = pt.x;
    bigY = pt.y;
    trace(bigX);
    trace(bigY);
    stwingy Guest

  4. #3

    Default Re: Clip position relative to _root

    Thanks, but..

    I tried to simplify my problem however, and you solved it brilliantly, but
    unfortunately, it doesn't work in my actual problem

    I actually need to be able to find the position relative to any clip (not
    _root) such as 'A' or 'B'
    e.g
    B.C.D._x ? so D._x relative to B

    Any idea?

    Pea Guest

  5. #4

    Default Re: Clip position relative to _root

    sorry Pea, short of finding each clips relative position from (0,0) on the main stage and subtracting values, i really don`t know.
    ps/ it helps to make reg points in upper left of each clip.
    stwingy Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139