LocalToGlobal and getBounds() problem...
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: LocalToGlobal and getBounds() problem...

  1. #1
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Hi guys, I got a slight problem here it goes:
    1. on the stage I have a movie clip name it Parent
    2. inside the Parent I have a seccond MC Child.

    How can I convert the bounds (getBounds) of the Child to the global coordinate system ? I tryed with localToGlobal but it did not work ?

    hey thanx a million
    Mad_Sci

  2. #2
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    boy I realy need this....its frustrating. A small code posted will do the job nicely.
    tnx
    Mad_Sci

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Posts
    896
    hey man,

    i tried it. i was able to get the bounds in any coordinate space but once gotten i couldn not use localtoglobal to convert it. i dont think you can. i can convert the x and y positions but not the bounds.

    i had 1 movie clip on the stage called "outer". inside that i had "inner". i put this code on "outer" as a clip event:

    onClipEvent (load) {
    point=new Object();
    point=inner.getBounds(_root);
    trace(point.xMin);
    }

    it gives the xmin of the "inner" clip as it applies to the main time line. where you see "_root" you could put any path you like.

    of course to access the other bounds you do: point.yMin....you get the picture.

    I hope this helps. To recap: I dont think you can convert the bounds using localtoglobal, but you dont have to if you put the path in the getBounds fxn.

    does this help?







  4. #4
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    O yea man thnx a bunch. I was putting the code in the inner MC. STUPID he he he. any way back to the stage.
    You are right about the loacal and global dont work with getBonds() allright
    Mad_sci

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

Poll by Flashkit.com