Reset registration?

i’m trying to zoom in on a picture at the specific spot where the mouse is clicked. ie if the mouse is clicked in the lower left corner, the pic gets bigger from there, not the center of the pic.

the only way i can think of to do this is to reset the registration point to the clicked position. is this possible?
is there another way to go the job done?

am i the least bit clear?

thanks.

You can’s change a registration point just like that, but you can simulate it: all you have to do is put your clip inside another clip. When you click the container clip, move that clip to the position of the mouse, and offset the picture by the exact opposite. It’s not very clear, but it’s explained in the Real Fake Drag mask tutorial :slight_smile:

i understand the concept. it’s a great idea.
but i’m bad at math.
i’ve been working on it and now i have a mess of variables doing very few things.

in the end, i can’t get the mc inside the container clip to go anywhere. onclicking zooms and centers the container to the point where the mouse was clicked. doing this only gets me to zoom in on the center of the pic while moving it around, clicking on different points. it looked like it was working until i realized i kept zooming on the same spot over and over no matter where i clicked.

is my logic ok?
i get the difference b/t the start pos. of the container and the clicked pos. of the mouse.
i subtracted that from the start pos. of the internal mc and tried to move it by that much. like i say, didn’t go anywhere.

i’m bad at math.

thanks for the help.

ok so i got it working. sorta.
only trouble is, on the initial click, the whole movie shifts to the lower left corner every time. after it gets there it works fine though.
any ideas? has anyone ever done this thing before?

Hmm, strange… Can you post your fla?

ok, i’m lame. i just fritzed out.

Can’t you upload the file on your server?

well i finally figured it out. but the thing’s too big to fit here. i tried the last 30 mins to get the thing smaller, but no luck.
i’ll put it up on my web site. good idea. thanks for the patience.
it’s here:
http://www.heikkilas.com/mytroubles.fla

and it’s fair to laugh hystarically at my code. i just learned as on my own from a book and this is the most complicated thing i’ve tried to do yet. i’d love the answer to my problem, but i’ll also take tips at getting to the same place in a more efficient way.

maybe this’ll be easier?

//sets variables
cntrx=container_mc._x;
cntry=container_mc._y;
pic1x=container_mc.pic1_mc._x;
pic1y=container_mc.pic1_mc._y;

//set clickings
container_mc.onrelease=function(){
mousex=_xmouse;
mousey=_ymouse;
container_mc._xscale+=10;
container_mc._yscale+=10;
container_mc._x=_xmouse;
container_mc._y=_ymouse;

//works variables
differencex=cntrlx-mousex;
differencey=cntrly-mousey;
container_mc.pic1_mc._x=differencex-pic1x;
container_mc.pic1_mc._y=differencey-pic1y;
}

false alarm. it’s 100% fixed now.

Can we see the final result?

To be honest, I am not sure I get what you were trying to do :stuck_out_tongue:

the very rough, but final thingy is here:
http://www.heikkilas.com/troubles.html

the trouble turned out to be the simplest of things. a stray letter stuck in a variable. if i had any idea i knew what i was doing, i would have looked for that first, i just assumed i was clueless.

maddening, but good to know the rest woulda worked if i could type.