Hi there,

[also posted in general help]

i have a little last problem with my movie.

i have a moviesequence, that is animated, flying around the screen. by moving around, the image get zoomed in and out. each time it is zommed in, i want it to move to the middle of the screen and back to normal position of movement.

Here is the script i tryed for now:


CODE IN SEQUENCE WHO HAVE TO MOVE TO CENTER POSITION:
------------------------------------
onClipEvent (load) {
centx = 200;
// what center x value is
centy = 150;
// what center y value is
speed = 5;
_level0.init = 0;
}
onClipEvent (enterFrame) {
if (_level0.init) {
dX = (centX-_x)/speed;
dY = (centY-_y)/speed;
_x += dX;
_y += dY;
if (math.abs(dX)<=0.05 && math.abs(dY)<=0.05) {
_level0.init = 0;
}
}
}
------------------------------------



CODE IN MAIN FRAME:
------------------------------------
_level0.init = 1;
------------------------------------


But this script dont work right. the image dont get centered from all positions, it dont fly back to where zoom started. Are there other solutions

example: take a angel, flying around. on a special action the sequence plays a seperate part with a zoom effect. each time the angel get bigger (zoom in) it should move to the middle of the screen and back to whereever the angel was flying around ....

Solutions:
another member gave me a actionscript, but it is not working well. maybe its working with a seperate image and a "magnet-effect" for the angel ?

it would be great, if someone could help me out, thanx a lot !!!