|
-
Map +mathematics
Hi,
Does anyone knows how I can solve this:
When I do a onRelease on the houses on this map
http://www.mr-andersen.no/zoom_map.jpg
I need to zoom in on the map where the house which is choosen is,
I've tried several things but I have huge problems how to do the math when moving and scaling the map
Can anyone here please help me out on this one
thanks in advance,
best regards
T
-
Banned
Hi,
Maybe something like this instead of onRelease...
code:
_root.onMouseDown = function() {
if (k>0) {
return;
}
zoom = true;
dir == 1 ? (dir=-1) : (dir=1);
if (dir == 1) {
pt = {x:_root._xmouse, y:_root._ymouse};
}
}
_root.onEnterFrame = function() {
if (!zoom) {
return;
}
_root._xscale += dir*k*50/8;
_root._yscale += dir*k*50/8;
var pt2 = {x:pt.x, y:pt.y};
_root.localToGlobal(pt2);
_root._x -= (pt2.x-pt.x);
_root._y -= (pt2.y-pt.y);
k++;
if (k == 8) {
zoom = false;
k = 0;
}
}
-
he he
Hi NTD
Thanks for answering
I found a file here on FlashKit with the exact same code
Just tweaked it to my needs
thanks
T
-
Banned
Just curious......
autozoom by T Norman?
-
-
Banned
lol, yea
-
Thanks
Thanks, that one saved me alot of headache.
Found the link to your movie in one the threads in this forum,
http://www.flashkit.com/board/showth...highlight=zoom
Hope I can help you someday
edit: oh, It was you who posted those URLs
best regards
T
Last edited by spiderLab; 09-25-2004 at 08:25 PM.
-
Banned
Glad it helps 
Keep on flashin
Regards
NTD
-
Ooops!
Hi again NTD
Thanks for helping me out
Can you please look at:
http://www.mr-andersen.no/testzoom.html
The file size is a bit lengthy right now, but
can you help me explaining why the map x and y jumps when it is zoomed the first time, I just don't haven't got the registration point thing in Flash yet 
thanks for helping
T
-
Banned
Hi,
Not sure what is happening, I have not run into that before. Are you using the zoom for the _root or targeting the MC itself?
-
MovieClip
Hi
I am targeting the movie clip
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|