Foros del Web » Creando para Internet » Flash y Actionscript »

como rotar un movieclip?

Estas en el tema de como rotar un movieclip? en el foro de Flash y Actionscript en Foros del Web. Hola, tengo esta funcion que carga contenido de un XML Código: import mx.controls.Alert; import mx.containers.Accordion; // Action script... // [Action in Frame 1] function analiza_xml() ...
  #1 (permalink)  
Antiguo 03/04/2008, 03:40
Axo
 
Fecha de Ingreso: abril-2003
Ubicación: Virtual
Mensajes: 953
Antigüedad: 21 años
Puntos: 7
como rotar un movieclip?

Hola, tengo esta funcion que carga contenido de un XML
Código:
import mx.controls.Alert;
import mx.containers.Accordion;
// Action script...

// [Action in Frame 1]
function analiza_xml()
{
    direcciones = new Array();
    vinculos = new Array();
    duraciones = new Array();
    primer_nodo = imagenes_xml.childNodes;
    nodo_galeria = primer_nodo[0].childNodes;
    var _l1 = 0;
    while (_l1 < nodo_galeria.length)
    {
        direcciones[_l1] = nodo_galeria[_l1].attributes.direccion;
        vinculos[_l1] = nodo_galeria[_l1].attributes.vinculo;
        duraciones[_l1] = nodo_galeria[_l1].attributes.duracion;
        _l1++;
    } // end while
} // End of the function
function muestra_imagen(cual)
{
    var _l3 = new Object();
    _l3.onLoadInit = function (objetivo_mc)
    {

        if (objetivo_mc == imagen1_mc)
        {
             _root.imagen2_mc.rotateSelection(45);
			objetivo_mc.swapDepths(imagen2_mc);
   		    alphaTween = new mx.transitions.Tween(_root.imagen2_mc, "_alpha", mx.transitions.easing.Regular.easeOut, 100, 0, 2, true);
            alphaTween2 = new mx.transitions.Tween(_root.imagen1_mc, "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 2, true);
        }
        else
        {
            objetivo_mc.swapDepths(imagen1_mc);
            alphaTween = new mx.transitions.Tween(_root.imagen1_mc, "_alpha", mx.transitions.easing.Regular.easeOut, 100, 0, 2, true);
            alphaTween2 = new mx.transitions.Tween(_root.imagen2_mc, "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 2, true);
        } // end if
        if (vinculos[cual] != undefined)
        {
            objetivo_mc.onRelease = function ()
            {
                getURL(vinculos[cual], "");
            };
        }
        else
        {
            objetivo_mc.onRollOver = function ()
            {
                objetivo_mc.useHandCursor = false;
            };
        } // end if
        mi_duracion = duraciones[cual];
        objetivo_mc.onEnterFrame = function ()
        {
            var _l1 = new Date();
            milisegundos = _l1.getTime();
            if (hito == undefined)
            {
                hito = milisegundos;
            } // end if
            milisegundos_pasados = milisegundos - hito;
            if (milisegundos_pasados > 1000 * mi_duracion)
            {
                hito = milisegundos;
                siguiente_imagen();
            } // end if
        };
    };
    var _l2 = new MovieClipLoader();
    _l2.addListener(_l3);
    if (imagen1_mc.getDepth() < imagen2_mc.getDepth())
    {
        _l2.loadClip(direcciones[cual], imagen1_mc);
    }
    else
    {
        _l2.loadClip(direcciones[cual], imagen2_mc);
    } // end if
} // End of the function
function siguiente_imagen()
{
   /* if (cual == undefined)
    {
        cual = 0;
    }
    else
    {
        cual++;
    } // end if
    if (cual == nodo_galeria.length)
    {
        cual = 0;
    } // end if
	*/
	var numPara = nodo_galeria.length;
	cual =random(numPara);
    muestra_imagen(cual);
} // End of the function
function lee_xml(que)
{
    imagenes_xml.load(que);
} // End of the function
_root.createEmptyMovieClip("imagen1_mc",1);
_root.createEmptyMovieClip("imagen2_mc",2);
//_root.createEmptyMovieClip("imagen3_mc",3);
var imagenes_xml = new XML();
imagenes_xml.ignoreWhite = true;
imagenes_xml.onLoad = function (success)
{
    analiza_xml();
    siguiente_imagen();
};
lee_xml("ofertas.xml");

stop ();
Y lo que quiero es cuando carge imagen1_mc o imagen2_mc que la gire y le de vueltas. En vez de el alpha que hace ahora, pues lo mismo pero que entre y salga agrandandose y dando vueltas...

Algo similar a esto: http://www.elchcomshop.de/WebRoot/St...y/angebote.swf
  #2 (permalink)  
Antiguo 03/04/2008, 11:11
Axo
 
Fecha de Ingreso: abril-2003
Ubicación: Virtual
Mensajes: 953
Antigüedad: 21 años
Puntos: 7
Re: como rotar un movieclip?

porfavor, nadie me puede echar una mano?
  #3 (permalink)  
Antiguo 04/04/2008, 02:05
Axo
 
Fecha de Ingreso: abril-2003
Ubicación: Virtual
Mensajes: 953
Antigüedad: 21 años
Puntos: 7
Re: como rotar un movieclip?

Lo subo para ver si me pueden ayudar...
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:37.