A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: finding _x and _y of embeded MC

  1. #1
    Guest

    Thumbs down

    i understand getProperty(target,property)
    and how to access _x and _y of a MC... but how do i get the _x and _y of an embeded MC relative to the stage...not its own internal "space". please help... thanks in advance

    [en]

  2. #2
    FK Supermodel laxmi19885's Avatar
    Join Date
    Jul 2001
    Location
    Mumbai
    Posts
    474
    xpos=_root.target._x;
    ypos=_root.target._y;

    another

    xpos=_root.target.mytarget._x;
    ypos=_root.target.mytarget._y;

  3. #3
    Guest
    yes, those give back the _x and _y values of the MC position inside the MC but not the _x _y position of acording to their location on the stage.

    --> make a MC, place it inside another MC... make the top MC draggable... now try to get the _x and _y value of the MC inside the draggable MC... it won't change since it is giving back only its position in the MC not its positon on the stage.

    i'm trying to make a draggable object that has MCs inside that when moved each internal movie clip might conditionally activate a different function

    even though, i'll try again -- thanks for your help....

    [en]


  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    But the first draggable mc's coordinates are available relative to the stage, right? Then if your nested mc is not moving inside the draggable mc, just add the coordinates' offset of this nested mc relative to the first mc, thus getting it's position on stage.

  5. #5
    Guest
    cool... that's pretty simple... should have thought of that one.. but i thought there might be a way to just call the value... i know a little math won't kill me =] just thought there might be an easier way...

    thanks

    [en]


  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    I'm not saying there isn't an easier way! Just that I guess this workaround would work!

  7. #7
    Guest
    it did...
    but i need to rethink since i am hoping to scale my draggable MC.. and scaling doesn't work with that work around [so far]....

    it does solve another problem... thanks for your help

    [en]

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