1 person found this helpful
position the rectangle at 0,0. position the parent movieclip wherever you want your rectangle to appear. you can then easily retrieve the mouse event's currentTarget x and y.
First, thanks for your reply. I did exactly that. In the event listener function I had to call the event.target.parent.name to get the name of the movie clip, but tracing the position of the mc HTMLbar returned 0. After getting your solution (and agreeing that this should be easy) I tried tracing the event.target.x and got the right position. I don't understand it but it's a solution.
shapeName = HTMLbar
event.target.x = 78
HTMLbar.x = 0
p.s. please mark this thread as answered, if you can.
In AS3 when adding MCs to the stage that contain children, in this case it was an empty movie clip with a shape, I got the name of the clip by tracing(event.target.parent.name) and the x coordinate by tracing event.target.x