Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/11/2008, 09:58
Avatar de websmonerris
websmonerris
 
Fecha de Ingreso: junio-2008
Ubicación: La Vila Joiosa
Mensajes: 89
Antigüedad: 15 años, 10 meses
Puntos: 2
Respuesta: Problema usando la línea de tiempo

Si trabajas con MC podrías probar con MCDRAG.hitTest(MCLUGARCORRECTO); busca en google sobre esta función testea posiciones de MC y en ellos hay DragAndDrop... Te pongo un codigo de un ejemplo que hice, se tratava de dos MC uno era el Rey y el otro era Chavez y el rey tenia DragAndDrop y este cuando lo soltavas y estava encima de Chavez le decia al MC del rey que fuera a un fotograma que decía CAllate! XDD y sino estava volvía a su sitio inicial con un Tween

Cita:
import mx.transitions.Tween;
import mx.transitions.easing.*;

rey_mc.onPress=function(){
izq=0;
der=stage.width-rey_mc._width;
sup=0;
inf=stage.height-rey_mc._height;
startDrag(this, false, 0, 0, 550, 440);
}

rey_mc.onRelease=rey_mc.onReleaseOutside=function( ){
stopDrag();
if(rey_mc.hitTest(chaves_mc)){
rey_mc.gotoAndPlay("callate");

}else{
new Tween(rey_mc, "_x", Elastic.easeOut, rey_mc._x,0,24, false);
new Tween(rey_mc, "_y", Elastic.easeOut, rey_mc._y,0,24, false);
}
}
__________________
Aplicaciones y Desarrollo Web
websmonerris.es
Blog Monerris (Flash, PHP y más)
monerris.wordpress.com