Comunidad de diseño web y desarrollo en internet online

Recoger la posicion de un MC

Citar            
MensajeEscrito el 11 Nov 2008 01:16 pm
:? Hola amigos, tengo una pequeña duda que, espero alguno de vosotros me sepais ayudar a resolver...

tengo un MC con el siguiente comportamiento:

mipelicula.onPress = function(){
this.startDrag(true, -182.8, -59.6, -189.9, -44.0)
}
mipelicula.onRelease = mipelicula.onReleaseOutside = function()
{ mdown = false; this.stopDrag(); };


La cuestión es que quiero, que si el usuario arrastra el MC hasta el punto (x -189.9 y -44.0), se realice un gotoandplay y la accion se traslade a otro punto de la pelicula principal.

¿¿¿Alguien sabe que comandos debo utilizar???

Gracias de antemano

Por carlosvudu

21 de clabLevel



 

msie
Citar            
MensajeEscrito el 11 Nov 2008 02:15 pm
Prueba

Código ActionScript :

mipelicula.onRelease = mipelicula.onReleaseOutside = function()
{
  mdown = false; 
  this.stopDrag(); 
  if(this._x==-189.9 && this._y== -44.0) _root.gotoAndPlay("bien")
};


Igual es muy difícil que lo suelte justo en ese punto, deberías chequear mas bien un rango o incluso usar hitTest o dropTarget (míralos en la ayuda)

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 19 Nov 2008 05:34 pm
Muchas gracias por todo Jorge!!!!

Por carlosvudu

21 de clabLevel



 

msie

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.