FLASH 3D carrusel con XML

  • LO_LA
  • Born
  • Born
  • No Avatar
  • Registrado: Ago 13, 2008
  • Mensajes: 2
  • Status: Offline

Nota Agosto 13th, 2008, 1:55 pm

Hola!

Estoy tratando de dar a cada icono del carrusel de un enlace a un archivo SWF diferente, sino porque es dinámicamente descargar en un archivo externo. Xml.... No sé cómo hacer los enlaces de los iconos en XML o cómo hacer referencia a cada icono en Action Script 2.0 y hacer que los botones con los enlaces.

Este es mi código de Action Script...
Código: [ Select ]

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
    {
        var t = home.attachMovie("item","item"+i,i+1);
        t.angle = i * ((Math.PI*2)/numOfItems);
        t.onEnterFrame = mover;
        t.toolText = nodes[i].attributes.tooltip;
        t.content = nodes[i].attributes.content;
        t.icon.inner.loadMovie(nodes[i].attributes.image);
        t.r.inner.loadMovie(nodes[i].attributes.image);
        t.icon.onRollOver = over;
        t.icon.onRollOut = out;
        t.icon.onRelease = released;
    }
}

function released()
{
    //BONUS Section
    var sou:Sound = new Sound();
    sou.attachSound("sdown");
    sou.start();
    
    home.tooltip._alpha = 0;
    for(var i=0;i<numOfItems;i++)
    {
        var t:MovieClip = home["item"+i];
        t.xPos = t._x;
        t.yPos = t._y;
        t.theScale = t._xscale;
        delete t.icon.onRollOver;
        delete t.icon.onRollOut;
        delete t.icon.onRelease;
        delete t.onEnterFrame;
        if(t != this._parent)
        {
            var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
            var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
            var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
        }
        else
        {
            var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
            var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
            var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,200,1,true);
            var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
            var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
            theText.text = t.content;
            var s:Object = this;
            tw.onMotionStopped = function()
            {
                s.onRelease = unReleased;
            }
        }
    }
}
  1. var xml:XML = new XML();
  2. xml.ignoreWhite = true;
  3. xml.onLoad = function()
  4. {
  5.     var nodes = this.firstChild.childNodes;
  6.     numOfItems = nodes.length;
  7.     for(var i=0;i<numOfItems;i++)
  8.     {
  9.         var t = home.attachMovie("item","item"+i,i+1);
  10.         t.angle = i * ((Math.PI*2)/numOfItems);
  11.         t.onEnterFrame = mover;
  12.         t.toolText = nodes[i].attributes.tooltip;
  13.         t.content = nodes[i].attributes.content;
  14.         t.icon.inner.loadMovie(nodes[i].attributes.image);
  15.         t.r.inner.loadMovie(nodes[i].attributes.image);
  16.         t.icon.onRollOver = over;
  17.         t.icon.onRollOut = out;
  18.         t.icon.onRelease = released;
  19.     }
  20. }
  21. function released()
  22. {
  23.     //BONUS Section
  24.     var sou:Sound = new Sound();
  25.     sou.attachSound("sdown");
  26.     sou.start();
  27.     
  28.     home.tooltip._alpha = 0;
  29.     for(var i=0;i<numOfItems;i++)
  30.     {
  31.         var t:MovieClip = home["item"+i];
  32.         t.xPos = t._x;
  33.         t.yPos = t._y;
  34.         t.theScale = t._xscale;
  35.         delete t.icon.onRollOver;
  36.         delete t.icon.onRollOut;
  37.         delete t.icon.onRelease;
  38.         delete t.onEnterFrame;
  39.         if(t != this._parent)
  40.         {
  41.             var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
  42.             var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
  43.             var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
  44.         }
  45.         else
  46.         {
  47.             var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
  48.             var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
  49.             var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,200,1,true);
  50.             var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
  51.             var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
  52.             theText.text = t.content;
  53.             var s:Object = this;
  54.             tw.onMotionStopped = function()
  55.             {
  56.                 s.onRelease = unReleased;
  57.             }
  58.         }
  59.     }
  60. }


¿Y cómo se ve mi archivo XML....
Código: [ Select ]
<icons>


<icon image="icon1.png" tooltip="Reel" content="Reel"/>

<icon image="icon2.png" tooltip="Short Film" content=" Short Film" />

<icon image="icon3.png" tooltip="About" content="About" />

<icon image="icon4.png" tooltip="Gallery" content="Gallery" />

<icon image="icon5.png" tooltip="Contact" content="Contact Form" />

<icon image="icon6.png" tooltip="Coming soon" />


</icons>
  1. <icons>
  2. <icon image="icon1.png" tooltip="Reel" content="Reel"/>
  3. <icon image="icon2.png" tooltip="Short Film" content=" Short Film" />
  4. <icon image="icon3.png" tooltip="About" content="About" />
  5. <icon image="icon4.png" tooltip="Gallery" content="Gallery" />
  6. <icon image="icon5.png" tooltip="Contact" content="Contact Form" />
  7. <icon image="icon6.png" tooltip="Coming soon" />
  8. </icons>


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

Nota Agosto 13th, 2008, 1:55 pm

  • graphixboy
  • Control + Z
  • Mastermind
  • Avatar de Usuario
  • Registrado: Jul 11, 2005
  • Mensajes: 1828
  • Loc: In the Great White North
  • Status: Offline

Nota Agosto 14th, 2008, 1:21 pm

misma manera que haces una imagen...acaba de hacer un fla de cada icono, publicarla como swf y sustituir a la "icon1.png, icon2.png", con icon1.swf etc, etc
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • CE/ Pyrocy
  • Proficient
  • Proficient
  • Avatar de Usuario
  • Registrado: Jul 14, 2006
  • Mensajes: 374
  • Loc: Santa Barbara, CA
  • Status: Offline

Nota Agosto 18th, 2008, 11:20 am

a mitad de camino hacia abajo a la derecha...

tuts 1-3 hace exactamente lo que usted desea.

http://gotoandlearn.com/
  • roje0913
  • Student
  • Student
  • No Avatar
  • Registrado: Sep 08, 2006
  • Mensajes: 78
  • Status: Offline

Nota Agosto 24th, 2008, 1:19 am

CE/ Pyrocy escribió:
a mitad de camino hacia abajo a la derecha...

tuts 1-3 hace exactamente lo que usted desea.

http://gotoandlearn.com/


sitio agradable, gracias
  • mindfullsilence
  • Professor
  • Professor
  • Avatar de Usuario
  • Registrado: Ago 04, 2008
  • Mensajes: 846
  • Status: Offline

Nota Agosto 25th, 2008, 7:00 pm

uno de mis favoritos libre tutorial de flash sitios fuera allí, donde su empecé a cabo en flash
Use your words like arrows to shoot toward your goal.
  • APR
  • Born
  • Born
  • No Avatar
  • Registrado: Abr 23, 2009
  • Mensajes: 1
  • Status: Offline

Nota Abril 23rd, 2009, 11:24 pm

Hola,

He creado carrusel 3D en acción de comandos de 2,0 con 3 iconos de carga dinámica a través de XML, pero lo que quiero es cuando hago clic en cualquier icono del carrusel Acordeón debe abrir el panel en relación con esa icon.For ejemplo, si hago clic en el icono de la casa el carrusel debe estar vinculado al botón de inicio el acordeón panel.Could cualquiera que me ayude con esto por favor.
Thnx

Publicar Información

  • Total de mensajes en este tema: 6 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 28 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