Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/12/2008, 20:39
Avatar de bernethe
bernethe
 
Fecha de Ingreso: abril-2004
Ubicación: San José, Costa Rica
Mensajes: 384
Antigüedad: 20 años
Puntos: 2
Respuesta: drag y duplicar

A ver, yo hice 3 figuras en el escenario que se llaman: ball_mc, poli_mc y rect_mc. Luego en el Layer puse este código:
Código actionscript:
Ver original
  1. var con:Number = 0;
  2.  
  3. function dupliDrag() {
  4.     con++;
  5.     _root[this._name].duplicateMovieClip("dup"+con,_root.getNextHighestDepth());
  6.     _root["dup"+con].startDrag();
  7.     this.onReleaseOutside  = function() {
  8.         _root["dup"+con].stopDrag();
  9.     };
  10.     _root["dup"+con].onRelease = function() {
  11.         this.stopDrag();
  12.     };
  13.     _root["dup"+con].onPress = function() {
  14.         this.startDrag();
  15.     };
  16. }
  17.  
  18. ball_mc.onPress = dupliDrag;
  19. poli_mc.onPress = dupliDrag;
  20. rect_mc.onPress = dupliDrag;
Espero que te sirva.
__________________
..::BERNETHE::..