[問題] 讀不到變數> <

看板Flash作者 (宏爺)時間17年前 (2008/11/25 22:44), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
小弟有以下的程式碼 function mouseOnScreen() { if ((_root._ymouse<337) && (_root._ymouse>0) && (_root._xmouse<600) && (_root._xmouse>0)) { return true; } else { return false; } } if (mouseOnScreen()) { this.vx += (_parent._xmouse-this._x)/50; } else { this.vx += (300-this._x)/100; } this._x += this.vx; this.vx *= .9; 這個程式碼 在AS1完全沒問題 可是到了AS2 不管小弟怎麼改都無法讀到this.vx這個值 用trace(this.vx) 都會出現NaN的值想請問大大這是怎麼回事= =" 第二個問題 是想問各位大大 在AS1&2 可以使用this[test1].panel=50;這種東西@@ 可是在AS3卻是不合法的 想問大大怎麼改成AS3的寫法~"~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.125.82.196
文章代碼(AID): #19B0y-ZB (Flash)
文章代碼(AID): #19B0y-ZB (Flash)