Pagina 2 di 2 primaprima 1 2
Visualizzazione dei risultati da 11 a 15 su 15

Discussione: moto da k._x a var._x

  1. #11
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    Lo script andava associato così com'è al movieclip che deve spostarsi...

  2. #12

    si

    si, infatti lo script che mi hai dato funziona ... ma se lo metto in un clip nidificato sballa tutto ... ma se gli imposto i target giusti, perkè non funzia?

  3. #13
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    Non c'entra, si sballa perchè:

    this.movex = _root._xmouse

    cambia in:

    codice:
    onClipEvent(load){
    	// t: current time, b: beginning value, c: change in value, d: duration
    	Math.linearTween = function (t, b, c, d){return c*t/d + b;};
    	this.movex = this.movey = 0;
    	this.duration = this.time = 20;
    }
    onClipEvent(enterFrame){
    	if(this.time > this.duration)return
    	this._x = Math.linearTween(this.time, this.beginx, this.movex, this.duration)
    	this._y = Math.linearTween(this.time, this.beginy, this.movey, this.duration)
    	this.time++
    }
    onClipEvent(mouseDown){
    	this.movex = this._parent._xmouse - (this.beginx = this._x);
    	this.movey = this._parent._ymouse - (this.beginy = this._y);
    	this.time = 0;
    }

  4. #14

    grazie

    grazie, ora funziona bene, mi sei stato di grande aiuto, a buon rendere... grazie ankora


    P.s.
    mo mi cerco nel dizionario action script _parent non l'ho mai usato ...

    P.P.s.

    Grazie ankora ciao

  5. #15

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.