Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Passaggio As1 as2

  1. #1

    Passaggio As1 as2

    Chi mi sa dire perchè questo script con actionscript1 va e col 2 no ?
    codice:
    var speed = 4;
    ball_mc.moveToMouse = function() {
    	this._x += (this.targetX-this._x)/this._parent.speed;
    	this._y += (this.targetY-this._y)/this._parent.speed;
    	this.duplicateMovieClip("dupe"+this._parent.depth, this._parent.depth++);
    };
    ball_mc.onMouseDown = function() {
    	this.targetX = this._parent._xmouse;
    	this.targetY = this._parent._ymouse;
    	this.onEnterFrame = this.moveToMouse;
    };

  2. #2
    Se ho capito bene cosa dovrebbe fare...prova così

    codice:
    var depth = 0
    var speed = 4;
    ball_mc.moveToMouse = function() {
    	this._x += (this.targetX-this._x)/this._parent.speed;
    	this._y += (this.targetY-this._y)/this._parent.speed;
    this.duplicateMovieClip("dupe"+this._parent.depth, this._parent.depth++);
    };
    ball_mc.onMouseDown = function() {
    	this.targetX = this._parent._xmouse;
    	this.targetY = this._parent._ymouse;
    	this.onEnterFrame = this.moveToMouse;
    };

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.