|
|
|||||
Может кто знает?
Есть код:
var acceleration = 12; var friction = 0.8; var a=1; ball_mc.moveToMouse = function() { var xdif = this.targetX-this._x; var ydif = this.targetY-this._y; this.xspeed += xdif/this._parent.acceleration; this.yspeed += ydif/this._parent.acceleration; this.xspeed *= this._parent.friction; this.yspeed *= this._parent.friction; this._x += this.xspeed; this._y += this.yspeed; this.duplicate(); this.checkDistance(); }; ball_mc.checkDistance = function() { if (Math.abs(this.targetX-this._x)<0.2 && Math.abs(this.targetY-this._y)<0.2) { this._x = this.targetX; this._y = this.targetY; delete this.onEnterFrame; } }; ball_mc.duplicate = function() { var dupe = this.duplicateMovieClip("dupe"+a,a++); dupe.onEnterFrame = function() { this._xscale = this._yscale -= 2; if (this._xscale<=0) { this.removeMovieClip(); } }; }; ball_mc.onMouseDown = function() { this.targetX = this._parent._xmouse; this.targetY = this._parent._ymouse; this.onEnterFrame = this.moveToMouse; }; Во Flash MX пашет, а в 2004 запускается, но ничего не делает, но тем не мение некоторые функции по отдельности пашут. Так вот собственно и вопрос: что именно из этого кода Flash 2004 не понимает?
__________________
<<<Молитесь на рассвет>>> |
|
|||||
у тебя xspeed, yspeed нигде не определены : для 6-ки это 0, а для 7-ки NaN поэтому и затык, если написать
то все работает |
|
|||||
Спасибо!!!
Точно, как-то не заметил.
Ну всё что можно проверил, а на это даже внимания не обратил Вот что значит привычка
__________________
<<<Молитесь на рассвет>>> |
Часовой пояс GMT +4, время: 03:02. |
|
« Предыдущая тема | Следующая тема » |
|
|