Resultados 1 al 6 de 6

Tema: Carrusel y pregunta

  1. #1
    Fecha de ingreso
    Apr 2004
    Mensajes
    2,648

    Carrusel y pregunta

    Hola muy buenas. Como no, sigo con mis tentativas con esto de la web bien ya se integrar un poco (solo un poco) mejor el flash y el html, pero todavía me falta camino por recorrer.

    Bueno, encontré esta página hace un tiempo y me dedique hacer el tutorial del carrusell:
    www.gotoandlearn.com.

    Y me pareció genial, pero lo que quiero es que el carrusell este dando vueltas con 3 elementos o 5 y que cuando presione en uno de ellos me aparezca una imagen grande del elemento, es decir, tengo dos archivos en imágenes el b1 de 100 por 100 píxeles y el b1size que tiene 400x400.

    El problema es que el video te enseña (en el tercer tutorial) hacer como que el b1 duplique su tamaño, haciendo visible los píxeles, entonces pensé en hacer un dropzone para que la imagen b1size fuera directamente ahí, no sé si me explico.

    La otra solución, seria poner el b1size a la mitad de tamaño, para que dando vueltas se viera pequeño y cuando le presionaras se duplicara el tamaño sin perdida de píxeles, bueno ya me comentáis que os parece y sialguno me puede ayudar.

    Dejo el código:
    Este es el primero (sin el aumento, sino para poner el b1 y el b1size juntos.
    VAR numofitems:number = 3.

    Var radiusx:number = 100.

    Var radiusy:number = 40.

    Var centerx:number = stage.width/1.5.

    Var centery:number = stage, height/1.4.

    Var speed:number = 0.08.

    Var perspective:number = 130.

    Var home:movieclip = this.

    Var truco:movieclip = this, attachmovie (truco,truco,10000).

    Toltip._alpha = 0.

    Var xmlml = new xml().

    Xml, ignorewhite = true.

    Xml, onload = function().
    { tvar nodes = this, firstchild, childnodes, tnomofitems = nodes, length, tfor(VAR i=0;i<numofitems;i++) t{ VAR te = home, attachmovie (item,item+i, i+1), t, angle = i * ((math. Pi*2)/numofitems), t, onenterframe = mover, t, toltext = nodes[i].attributes, truco, t, icon, inner, Load Movie (nodes[i].attributes, image), tr, inner, Load Movie (nodes[i].attributes, image), t}.
    }.

    Xml, load(icons.xml).

    Function mover ().
    { tthis._x = math, cos(this, angle) * radiusx + centerx, tthis._y = math, sin(this, angle) * radiusy + centery, tvar s:number = (this._y - Perspective) / (centery+radiusy-perspective), tthis._xscale = this._yscale = s * 80, tthis, angle += this._parent, speed, tthis, swapdepths(math, round(this._xscale) + 100).
    }.

    This, onmousemove = function().
    { tsped = (this._xmouse-centerx)/2200.
    }.
    Y este es el código con el incremento del b1 al doble, donde se me joden los píxeles, y el cual me gustaría cambiar por el b1size, pero reduciendo los 400x400 píxeles y dejándolo en 100 por 100 píxeles, para cuando le de al botón no se vean los píxeles rotos, sino que se vea la imagen al 100%.
    Import mx, utils. Delegate.

    Import mx.transicións. Twen.

    Import mx.transicións, easing.*.

    Var numofitems:number = 3.

    Var radiusx:number = 100.

    Var radiusy:number = 40.

    Var centerx:number = stage.width/1.5.

    Var centery:number = stage, height/1.4.

    Var speed:number = 0.08.

    Var perspective:number = 130.

    Var home:movieclip = this.

    Thetext._alpha = 0.

    Var truco:movieclip = this, attachmovie (truco,truco,10000).

    Toltip._alpha = 0.

    Var xmlml = new xml().

    Xml, ignorewhite = true.

    Xml, onload = function().
    { tvar nodes = this, firstchild, childnodes, tnomofitems = nodes, length, tfor(VAR i=0;i<numofitems;i++) t{ VAR te = home, attachmovie (item,item+i, i+1), t, angle = i * ((math. Pi*2)/numofitems), t, onenterframe = mover, t, toltext = nodes[i].attributes, truco, t, content = nodes[i].attributes, content, t, icon, inner, Load Movie (nodes[i].attributes, image), tr, inner, Load Movie (nodes[i].attributes, image), t, icon, onrollover = over, t, icon, onrollout = out, t, icon, onreléase = released, t}.
    }.

    Function over().
    { thome, truco, tiptext, text = this._parent, toltext, thome, truco._x = this._parent._x, thome, truco._y = this._parent._y - This._parent._height/2, thome, truco, onenterframe = delegate, create (this, movetip), thome, truco._alpha = 100.
    }.

    Function out().
    { tdeleete home, truco, onenterframe, thome, truco._alpha = 0.
    }.

    Function released().
    { thome, truco._alpha = 0, tfor(VAR i=0;i<numofitems;i++) t{ VAR t:movieclip = home[item+i] t.xpues = t._x, t, ypues = t._y, t, thescale = t._xscale, deleete t, icon, onrollover, deleete t, icon, onrollout, deleete t, icon, onrelease, deleete t, onenterframe, if(t.= this._parent) { VAR tw:twen = new twen(t,_xscale,strong, easeout, t._xscale,0,1, true), VAR tw2:twen = new twen(t,_yscale,strong, easeout, t._yscale,0,1, true), VAR tw3:twen = new twen(t,_alpha,strong, easeout,100,0,1, true), } else { VAR tw:twen = new twen(t,_xscale,strong, easeout, t._xscale,200,1, true), VAR tw2:twen = new twen(t,_yscale,strong, easeout, t._yscale,200,1, true), VAR tw3:twen = new twen(t,_x,strong, easeout, t._x,400,1, true), VAR tw4:twen = new twen(t,_y,strong, easeout, t._y,350,1, true), VAR tw5:twen = new twen(thetext,_alpha,strong, easeout,0,100,1, true), thetext, text = t, content, VAR s:object =this, tw.onmotionstopped = function() { t, onreléase = unreleased; } } t}.
    }.

    Function unreleased().
    { tdeleete this, onrelease, tvar tw:twen = new twen(thetext,_alpha,strong, easeout,100,0,0.5, true), tfor(VAR i=0;i<numofitems;i++) t{ VAR t:movieclip = home[item+i], if(t.= this._parent) { VAR tw:twen = new twen(t,_xscale,strong, easeout,0t, thescale,1, true), VAR tw2:twen = new twen(t,_yscale,strong, easeout,0t, thescale,1, true), VAR tw3:twen = new twen(t,_alpha,strong, easeout,0,100,1, true), } else { VAR tw:twen = new twen(t,_xscale,strong, easeout,200t, thescale,1, true), VAR tw2:twen = new twen(t,_yscale,strong, easeout,200t, thescale,1, true), VAR tw3:twen = new twen(t,_x,strong, easeout, t._x, t.xpos,1, true), VAR tw4:twen = new twen(t,_y,strong, easeout, t._yt, ypos,1, true), tw.onmotionstopped = function() { for(VAR i=0;i<numofitems;i++) { VAR t:movieclip = home[item+i], t, icon, onrollover = delegate, create (t, icon, over), t, icon, onrollout = delegate, create (t, icon, out), t, icon, onreléase = delegate, create (t, icon, released), t, onenterframe = mover; } } } t}.
    }.

    Function movetip().
    { thome, truco._x = this._parent._x, thome, truco._y = this._parent._y - This._parent._height/2.
    }.

    Xml, load(icons.xml).

    Function mover ().
    { tthis._x = math, cos(this, angle) * radiusx + centerx, tthis._y = math, sin(this, angle) * radiusy + centery, tvar s:number = (this._y - Perspective) / (centery+radiusy-perspective), tthis._xscale = this._yscale = s * 80, tthis, angle += this._parent, speed, tthis, swapdepths(math, round(this._xscale) + 200).
    }.

    This, onmousemove = function().
    { tsped = (this._xmouse-centerx)/2200.
    }.
    Si 146 líneas de código.

  2. #2
    Fecha de ingreso
    Feb 2004
    Mensajes
    4,813

    Carrusel y pregunta

    Vaya, tuestasloco.

  3. #3
    Fecha de ingreso
    Apr 2004
    Mensajes
    2,648

    Carrusel y pregunta

    Venga José que es un pequeño pequeño reto. Si pudiera saber, que con la imagen b1size, puedo escalarla un tanto por ciento (reducirla) y luedo dejarla a su tamaño original, creo que con eso tendría.

  4. #4
    Fecha de ingreso
    Feb 2004
    Mensajes
    4,813

    Carrusel y pregunta

    Nada de pequeño. Para escalar una imagen tienes la propiedad _xscale e _yscale, no sé si te sirva de algo esta información.

  5. #5
    Fecha de ingreso
    Apr 2004
    Mensajes
    2,648

    Carrusel y pregunta

    Bueno, me pongo a trastear un poco, lo intento poner como. VAR _xscale:number = -50. VAR _yscale:number = -50. Voy a probarlo y luego digo si he encontrado la posible solución.

  6. #6
    Fecha de ingreso
    Feb 2004
    Mensajes
    4,813

    Carrusel y pregunta

    No, el atributo _xscale lo tienes que usar sobre un MC, por ejemplo, así: Botón1._xscale = 50. Hace muchísimo que no lo uso así que, no estoy 100% seguro. Suerte.

Temas similares

  1. Adobe Photoshop Crear un carrusel para Instagram desde Photoshop
    Por alexdg85 en el foro Photoshop
    Respuestas: 1
    : 25-10-2022, 08:51
  2. Carrusel 3d menú flash
    Por egemarxz en el foro Programas de Diseño 3D y CAD
    Respuestas: 1
    : 25-06-2008, 18:31
  3. 3dsMax Pregunta
    Por raiden. en el foro Animación y Rigging
    Respuestas: 2
    : 23-05-2007, 13:42
  4. Pregunta
    Por Edy en el foro Programas de Diseño 3D y CAD
    Respuestas: 4
    : 12-02-2006, 00:59
  5. Una pregunta
    Por eli en el foro Postproducción
    Respuestas: 7
    : 13-09-2005, 00:02

Etiquetas para este tema