Please please please please help!

Can anyone tell me WHY the drag button on this doesn’t work? I want to be able to drag the frame and have it update on the big map!

Please help me all you flash wizards out there!

Thank you!

  • humble flash newbie

p.s. fla too big to attach? posted below . . .

here is the link to the file:

http://www.humboldt.edu/~mgk9/

anyone? please?:crazy:

minimap mc, try considering
if (frame.dragging) {
and not
if (dragging) {

for in your button you have declared
// set dragging of frame to true
minimap.frame.dragging = true

suggestion…
why not just try to place your button inside your minimap mc… i think that would save a lot code… =)

:*(

Thanks for the tip - it now looks like it WANTS to drag (shakes back and forth with mouse) but isn’t really sticking anywhere. What else should I try?

www.humboldt.edu/~mgk9/Test2.fla

sorry lunatic, everything seems too vague to me yet, anyhu, try placing this on your minimap mc…

[AS]onClipEvent (load) {
bounds = {L:-50, R:50, T:-66.7, B:66.7};
}
onClipEvent (enterFrame) {
if (frame.dragging) {
// if dragging move based on offset (both set by button under map)
// while keeping within bouds regulated by min and max
this.frame._x = Math.min(Math.max(_xmouse-offset[0], bounds.L), bounds.R);
this.frame._y = Math.min(Math.max(_ymouse-offset[1], bounds.T), bounds.B);
updateAfterEvent();
}
}
onClipEvent (load) {
scale = 1;
// 100%
}
onClipEvent (enterFrame) {
s = 100100/_root.scale;
// reverse scale
_root.map.center._x=-this.frame._x
5;
// position based on this 10% scale
_root.map.center._y=-this.frame._y5;
this.frame._xscale = frame._yscale=s
scale;
// scale to reverse
}[/AS]

Hi noxious,

Thanks for sticking with me. I spent two days struggling with it and have it almost working. The drag now works but the view in the frame doesn’t seem to correspond to the view in the big map window. From what I can tell it looks like if you zoom in and then click the mouse anywhere BUT the center and then drag, then the frame jumps (but not the main map) to center on the mouse. Does that make sense? If you have any ideas how I can maintain the matching of the _x and _y coordinates for both the frame and the main map I’d love to hear it!

:tb:

hello lunatic! sorry for the delay… im kinda busy…

i still can’t clearly paint your picture… anyhu, i suggest you set the “lock mouse to center” to false.

…the last time i “work” with file you attached, everything seems to be ok… i just cant attached it’s quiet big. ahh! i’ll just try to email it if you like.

hmmmm… i think you have fixed it already.
…as almost everyone hear said… “try to experiment!” :thumb:

Hi noxious!

Yeah, I got the file working, but it still isn’t accurate. I’m not using the StartDrag command so there is no lock on the center. The x and y coordinates of the little inset frame are determined by min/max values and set bounds. I’m not sure why it doesn’t work but it’s making me crazy!

I have posted the question on lots of forums but so far you are the only one who has answered . . . Thanks for sticking with me!

Anyone else out there want to give it a go?:block: