Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    Movieclip trascinabile e dimensioni modificabili!

    Devo creare una movieclip che sia trascinabile sullo schermo e che attraverso la tastiera si possano modificare le dimensioni: onClipEvent (enterFrame) {
    if (Key.isDown(Key.PGUP)) {
    this._height = _height+10;
    this._width = _width+10;
    } else if (Key.isDown(Key.PGDN)) {
    this._height = _height-10;
    this._width = _width-10;
    }
    }


    Allora io riesco a creare la movieclip e a cambiarle le dimensioni..ma non riesco a spostarla!!!

    Altro problema..devo creare un pulsante che resetti tutto allo stato originale!!!
    Come si fa???

    Qualcuno mi aiuti!!!!!!

  2. #2
    al clip ke devi istanziare "mc"

    codice:
    onClipEvent(load){
    _root.xinit=this._height;
    _root.yinit=this._width;
    _root.xpos=this._x;
    _root.ypos=this._y;
    }
    onClipEvent (enterFrame) { 
    if (Key.isDown(Key.PGUP)) { 
    this._height = _height+10; 
    this._width = _width+10; 
    } else if (Key.isDown(Key.PGDN)) { 
    this._height = _height-10; 
    this._width = _width-10; 
    } 
    }
    on(press){
    startDrag(this);	
    }
    on(release){
    stopDrag()	
    }
    al pulsante ke riporta alle dimensioni di partenza
    codice:
    on(release){
    _root.mc._y=_root.ypos;
    _root.mc._x=_root.xpos;
    _root.mc._height=_root.yinit;
    _root.mc._width=_root.xinit;
    }

  3. #3
    *_______________________*
    wow!!! grazie mille!!! funziona alla perfezione!!!

  4. #4
    prego

    ciao


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.