Visualizzazione dei risultati da 1 a 2 su 2

Discussione: start drag

  1. #1

    start drag

    ciao a tutti, spero vi vada alla grande:
    ho un quesito:
    startDrag("/luce1", true);
    con questo faccio muovere un oggetto che si chiama luce1
    pero' vorrei far muovere anche un altro oggeto (luce2) insieme a luce1
    se faccio
    startDrag("/luce1", true);
    startDrag("/luce2", true);
    insieme, mi muove solo luce 2!! ovvero l'ultimo

    come si scrive correttamente?

    lo scopo e far muovere una luce con la maschera che lo segue

    grazie come sempre
    yah man...
    MY SITE
    MY SITE

  2. #2
    non so come controlli l'inizio dello startDrag() ma potresti ad esempio

    codice:
    luce1.onPress=function(){
        this.startDrag(true)
        move_Mask()
    }
    
    luce1.onRelease = luce1.ReleaseOutside=function(){
        delete luce2.onEnterFrame
    }
    
    function move_Mask(){
          luce2.onEnterFrame=function(){
               this._x = luce1._x
               this._y = luce1._y
         }
    }

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.