center movie clips dynamically, as3.0
Hi. I have seen this discussed both on Adobe Forums and other sites but I can't seem to make sense of the code supplied by what I have seen thus far.
I am trying to center display objects that are added to the stage at runtime dynamically through a basic drawing application.
the code is something like this:
1. add an event listener for the drawing event.
2. add the path you want to draw to a container movie clip on the stage.
3. add an enter-frame event listener to change the scale of the path randomly .... and this is the moment i want to change the default top,left registration point to the center,center of the path. each path has its own registration point as i can tell thus far but at this point the scale is happening from the top,left of the container rather than about the path's own self. and if it were to happen about the path i would have to get the bounds of the path and do some averaging to center the registration point.
unfortunately i don't know what the code looks like to achieve what i'm trying to get.
any help is appreciated. thanks in advance.
