barra de desplazamiento

  • paopao
  • Born
  • Born
  • No Avatar
  • Registrado: Ene 22, 2011
  • Mensajes: 1
  • Status: Offline

Nota Enero 22nd, 2011, 8:10 am

Hola a todos, tales...I & #39, estoy haciendo una galería de plantillas escoger uno que ya, pero que tenía que hacer algunos cambios...el personal había dos imágenes en dos verticalmente y horizontalmente es necesario que se una a una, y así lo hice, pero que...el problema está en la barra de desplazamiento! No he podido hacer cojo horizontal, basta con decir que no soy experto en el código y lo poco, y cambió la altura y la anchura x y la función de la barra de desplazamiento, pero no trabajo para mí
Código: [ Select ]
function scroller():Void
{
    scroller_mc._y = scrollable_area_mc._y;
    tn_group._y = tn_area._y;
    sr = tn_area._height/tn_group._height;
    scroller_mc._height = scrollable_area_mc._height * sr;
    sd = scrollable_area_mc._height - scroller_mc._height;
    cd = tn_group._height - tn_area._height;
    cr = cd / sd;
    tn_group.setMask(tn_area);
    
    if( tn_group._height <= tn_area._height )
    {
        scroller_mc._visible = scrollable_area_mc._visible = false;
    }
    else
    {
        scroller_mc._visible = scrollable_area_mc._visible = true;
    }
    scroller_mc.onPress = function()
    {
        this.startDrag(false, this._x, scrollable_area_mc._y, this._x,
                      scrollable_area_mc._y + scrollable_area_mc._height - this._height + 1);
        onDrag = true;
        this.onEnterFrame = function()
        {
            new_y = tn_area._y + scrollable_area_mc._y*cr - this._y*cr;
            cv = (new_y - tn_group._y) * scrolling_speed;
            tn_group._y += cv;
            if( onDrag == false && cv_old == cv )
                delete this.onEnterFrame;
            cv_old = cv;
        }
    }
    scroller_mc.onRelease = scroller_mc.onReleaseOutside = function()
    {
        this.stopDrag();
        onDrag = false;
    }
}
  1. function scroller():Void
  2. {
  3.     scroller_mc._y = scrollable_area_mc._y;
  4.     tn_group._y = tn_area._y;
  5.     sr = tn_area._height/tn_group._height;
  6.     scroller_mc._height = scrollable_area_mc._height * sr;
  7.     sd = scrollable_area_mc._height - scroller_mc._height;
  8.     cd = tn_group._height - tn_area._height;
  9.     cr = cd / sd;
  10.     tn_group.setMask(tn_area);
  11.     
  12.     if( tn_group._height <= tn_area._height )
  13.     {
  14.         scroller_mc._visible = scrollable_area_mc._visible = false;
  15.     }
  16.     else
  17.     {
  18.         scroller_mc._visible = scrollable_area_mc._visible = true;
  19.     }
  20.     scroller_mc.onPress = function()
  21.     {
  22.         this.startDrag(false, this._x, scrollable_area_mc._y, this._x,
  23.                       scrollable_area_mc._y + scrollable_area_mc._height - this._height + 1);
  24.         onDrag = true;
  25.         this.onEnterFrame = function()
  26.         {
  27.             new_y = tn_area._y + scrollable_area_mc._y*cr - this._y*cr;
  28.             cv = (new_y - tn_group._y) * scrolling_speed;
  29.             tn_group._y += cv;
  30.             if( onDrag == false && cv_old == cv )
  31.                 delete this.onEnterFrame;
  32.             cv_old = cv;
  33.         }
  34.     }
  35.     scroller_mc.onRelease = scroller_mc.onReleaseOutside = function()
  36.     {
  37.         this.stopDrag();
  38.         onDrag = false;
  39.     }
  40. }


Repito que lo que es casi sin necesidad de programación...
Gracias de antemano
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Enero 22nd, 2011, 8:10 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 37 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