Hello.
I have a little problem with actionscripted magnifier from flash kit. How can i modify it to be able to zoom my dynamicaly loaded .jpges ? I use dynamic pageflip script, and i want to zoom externally loaded pages (jpg). Is it possible ?
Thanks for help and sorry for my english, i know its bad :ko:
// copyright 2004 by brinton corb (flashkit id: brintcorb). you are welcome to use and reproduce this script, but must leave in this header. emails welcome at brintcorb@hotmail.com
// "myclip" is the name of the clip in the library that you want to magnify. In the properties or linkage panel for "myclip", click the "export for actionscript" box, and set the Indetifier to the default clip name for "myclip".
this.magV = {magmovie:"myclip", xpos:200, ypos:150, viewerxsize:100, viewerysize:100, magnification:3};
MovieClip.prototype.drawFillRectangle = function(xlen, ylen, x, y, lineThick, lineRgb, lineAlpha, fillRgb, fillAlpha) {
if (lineThick == undefined) {
lineThick = 2;
}
if (lineRgb == undefined) {
lineRgb = 0x000000;
}
if (lineAlpha == undefined) {
lineAlpha = 100;
}
if (fillRgb == undefined) {
fillRgb = 0xFFFFFF;
}
if (fillAlpha == undefined) {
fillAlpha = 100;
}
this.lineStyle(lineThick, lineRgb, lineAlpha);
this.beginFill(fillRgb, fillAlpha);
this.moveTo(x, y);
this.lineTo(x+xlen, y);
this.lineTo(x+xlen, y-ylen);
this.lineTo(x, y-ylen);
this.lineTo(x, y);
this.endFill;
};
// create clips for viewer, mask and attach the clip to be magnified
this.attachMovie(magV.magmovie, magV.magmovie, 0);
this.createEmptyMovieClip("viewer", 1);
viewer.drawFillRectangle(magV.viewerxsize, magV.viewerysize, -magV.viewerxsize/2, magV.viewerysize/2);
this.attachMovie(magV.magmovie, "mag", 2);
this.createEmptyMovieClip("mask", 3);
mask.drawFillRectangle(magV.viewerxsize, magV.viewerysize, -magV.viewerxsize/2, magV.viewerysize/2);
this.mag.setMask(this.mask);
// initialize parameters
this.magmo = this[magV.magmovie];
magmo._x = magV.xpos;
magmo._y = magV.ypos;
mag._x = magV.xpos;
mag._y = magV.ypos;
mag.magfactor = magV.magnification;
mag._xscale = mag._yscale=100*mag.magfactor;
mag.xoffset = mag._x*mag.magfactor;
mag.yoffset = mag._y*mag.magfactor;
// create magnifier and track to the mouse
this.magnifier = new Object();
magnifier.onMouseMove = function() {
viewer._x = mask._x=_root._xmouse;
viewer._y = mask._y=_root._ymouse;
mag._x = viewer._x-(mag.magfactor*_root._xmouse)+mag.xoffset;
mag._y = viewer._y-(mag.magfactor*_root._ymouse)+mag.yoffset;
};
Mouse.addListener(magnifier);