¡Hola a todos.
Tengo un MC llamado "zoom" que el cursor del ratón debe cambiar cada vez que el cursor en sí mismo es onRollOver en un img MC "".
Este "zoom" mc consta de dos marcos con (respectivamente) un "+" cursor de zoom y un "-" cursor de zoom.
Soy incapaz de establecer el cursor con el fin de mostrar el "-" cursor cuando "img" es ampliada y el "+" cursor cuando "img" no es ampliada.
Heres el código que determina "img" de escala:
myZoom = function (myDepth)
{
if (myDepth == "deep")
{
myDepth = 4;
}
else if (myDepth == "medium")
{
myDepth = 8;
}
else if (myDepth == "light")
{
myDepth = 12;
} // end else if
img.onRelease = function()
{
if (k > 0)
{
return;
} // end if
zoom = true;
dir == 1 ? (dir = -1) : (dir = 1);
if (dir == 1)
{
pt = {x: img._xmouse, y: img._ymouse};
} // end if
};
this.onEnterFrame = function ()
{
if (!zoom)
{
return;
} // end if
img._xscale = img._xscale + dir * k * 50 / myDepth;
img._yscale = img._yscale + dir * k * 50 / myDepth;
var pt2 = {x: pt.x, y: pt.y};
img.localToGlobal(pt2);
img._x = img._x - (pt2.x - pt.x);
img._y = img._y - (pt2.y - pt.y);
++k;
if (k == <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool"><!-- s8) -->
{
zoom = false;
k = 0;
} // end if
};
};
myZoom("medium");
- myZoom = function (myDepth)
- {
- if (myDepth == "deep")
- {
- myDepth = 4;
- }
- else if (myDepth == "medium")
- {
- myDepth = 8;
- }
- else if (myDepth == "light")
- {
- myDepth = 12;
- } // end else if
- img.onRelease = function()
- {
- if (k > 0)
- {
- return;
- } // end if
- zoom = true;
- dir == 1 ? (dir = -1) : (dir = 1);
- if (dir == 1)
- {
- pt = {x: img._xmouse, y: img._ymouse};
- } // end if
- };
- this.onEnterFrame = function ()
- {
- if (!zoom)
- {
- return;
- } // end if
- img._xscale = img._xscale + dir * k * 50 / myDepth;
- img._yscale = img._yscale + dir * k * 50 / myDepth;
- var pt2 = {x: pt.x, y: pt.y};
- img.localToGlobal(pt2);
- img._x = img._x - (pt2.x - pt.x);
- img._y = img._y - (pt2.y - pt.y);
- ++k;
- if (k == <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool"><!-- s8) -->
- {
- zoom = false;
- k = 0;
- } // end if
- };
- };
- myZoom("medium");
Gracias!