This is apropos of nothing, but I want to share this so it is in the
archive.
If you are using Zoomify and want your image to stay within the
viewer's boundaries, you can use this code.
After not getting a response from Zoomify I muddled for days to come
up with this. Sad, but true.
I hope this will help others avoid some frustration.
In the ZoomifyViewer's "MousePan" function you'll find this line of
code:
this.gCurrentTier_mc.startDrag();
Replace it with this code:
// determine bounds to keep map in viewer
var w = this.tier1_mc._width;
var h = this.tier1_mc._height;
var left = -((1 - this.getWindowRight()) * w);
var right = (this.getWindowLeft() * w);
var top = -((1 - this.getWindowBottom()) * h);
var bottom = (this.getWindowTop() * h);
this.gCurrentTier_mc.startDrag(false, left, top, right, bottom);
That should keep the user from seeing the outer edges of your image,
or dragging it out of the viewer entirely.
Note: this works particularly well if your image's proportions are
the same as your view window's.
Thanks everybody,
Kirk
FINE DESIGN GROUP
551 Natoma Street San Francisco, CA 94103 http://
www.finedesigngroup.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com