Hi:
How do you center a clip within a mask?
I have a random easing script, that works great, except I can't figure out how to center the MC I'm animating within it's mask.
To center a popup in Javascript you just subtract the width of the popup from the screen width/resolution and divide the remainder by 2. So, I tried subtracting the width of the mask from the width of the photo inside of it, and dividing by 2, but it doesn't work. However, the width of the photo and the width of the mask are the only two constants I have to work with to fix a center point.
Below is an example:
http://www.ekigroup.com/random/randomEasing.swf
I have the above example working well, but in a convoluted way. So, the formula changes when the size of the mask changes. I'm looking for a tried-n-true formula for doing this, so that the photo is centered, and the animation covers every square pixel of the photo. I'm sure you've already noticed--I'm no math wiz.
Again, all I want to be able to do is to center the [random] MOVEMENT of the clip inside of the mask, i.e., fix a center point. BTW, the photo is a MC, inside the MC containing the mask.
Any help would be greatly appreciated.
James
He is risen!!!
