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

Arrastrar múltiples objetos

Estas en el tema de Arrastrar múltiples objetos en el foro de Flash y Actionscript en Foros del Web. Hola. Quisiera plantear dos preguntas: 1. En un ejercicio de arrastrar hasta la posición correcta, ¿de qué forma se puede conseguir que un mismo arrastrable ...
  #1 (permalink)  
Antiguo 14/10/2011, 11:14
 
Fecha de Ingreso: septiembre-2011
Ubicación: España
Mensajes: 5
Antigüedad: 12 años, 7 meses
Puntos: 0
Arrastrar múltiples objetos

Hola.

Quisiera plantear dos preguntas:

1. En un ejercicio de arrastrar hasta la posición correcta, ¿de qué forma se puede conseguir que un mismo arrastrable pueda ir a más de un destino? Por ejemplo, una vocal acentuada que pueda ir a huecos en palabras diferentes.

2. En la película de [URL="http://www.tutorialized.com/view/tutorial/Custom-mouse-cursor-and-draggable-objects/3091]"]esta página[/URL] el código es el siguiente:

/* DRAG and DROP */
/* Ptaczek 2002 */

fscommand ("allowscale", false );

xpos = new Array(); // arrays that keeps the x,y positions of
ypos = new Array(); // dragBalls start positions

for(i=0;i<5;i++) {
// place 6 dragBalls on the stage
_root.attachMovie("drag", "_drag"+i, 20+i);
_root["_drag"+i]._x = 50+i*35;
_root["_drag"+i]._y = 40;
_root["_drag"+i].num = i; // set balls internal number
xpos[i] = getProperty("_drag"+i, _x); // and store
ypos[i] = getProperty("_drag"+i, _y); // positions into arrays



// place 6 dropZones on the stage. There is no need
// to keep their positions.
_root.attachMovie("drop", "_drop"+i, 10+i);
_root["_drop"+i]._x = 50+i*35;
_root["_drop"+i]._y = 240-40;
_root["_drop"+i].num = i; // set dropZones internal number
_root["_drop"+i].cover = false; // reset the 'cover' flag
}

stop();


/* FUNCTIONS */

/* change the cursor shape */
function chngCursor(shape) {
_root.cursor.gotoAndPlay(shape);
}

/* update the cursor coords */
function updateCursor() {
_root.cursor._x = _xmouse;
_root.cursor._y = _ymouse;
updateAfterEvent(); // necessary for smooth movement !!!
}



No consigo transformarlo de manera que en lugar de tener 5 elementos para arrastrar haya 10, colocados en dos filas y otros tantos destinos. ¿Podéis ayudarme?

Gracias anticipadas.

Etiquetas: arrastrar, destinos, drag, drop, getproperty, multiples
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 15:09.