[Flash 8] Problema con cursor cambio

  • rtank
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Mar 26, 2008
  • Mensajes: 6
  • Status: Offline

Nota Abril 15th, 2008, 6:31 am

¡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:

Código: [ Select ]
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");
  1. myZoom = function (myDepth)
  2. {
  3.     if (myDepth == "deep")
  4.     {
  5.         myDepth = 4;
  6.     }
  7.     else if (myDepth == "medium")
  8.     {
  9.         myDepth = 8;
  10.     }
  11.     else if (myDepth == "light")
  12.     {
  13.         myDepth = 12;
  14.     } // end else if
  15.     img.onRelease = function()
  16.     {
  17.         if (k > 0)
  18.         {
  19.             return;
  20.         } // end if
  21.         zoom = true;
  22.         dir == 1 ? (dir = -1) : (dir = 1);
  23.         if (dir == 1)
  24.         {
  25.             pt = {x: img._xmouse, y: img._ymouse};
  26.         } // end if
  27.     };
  28.     this.onEnterFrame = function ()
  29.     {
  30.         if (!zoom)
  31.         { 
  32.             return;
  33.         } // end if
  34.         img._xscale = img._xscale + dir * k * 50 / myDepth;
  35.         img._yscale = img._yscale + dir * k * 50 / myDepth;
  36.         var pt2 = {x: pt.x, y: pt.y};
  37.         img.localToGlobal(pt2);
  38.         img._x = img._x - (pt2.x - pt.x);
  39.         img._y = img._y - (pt2.y - pt.y);
  40.         ++k;
  41.         if (k == <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool"><!-- s8) -->
  42.         { 
  43.             zoom = false;
  44.             k = 0;
  45.         } // end if
  46.     };
  47. };
  48. myZoom("medium");


Gracias!
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Abril 15th, 2008, 6:31 am

Publicar Información

  • Total de mensajes en este tema: 1 mensaje
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 33 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC