|
||||
why wont u introduce a simple variable to state it is already in the drop zone ... eg ::
Code:
onClipEvent(load){
origX = this._x;
origY = this._y;
this.fixed = false;
}
onClipEvent(mouseDown){
if(this.hitTest(_root._xmouse, _root._ymouse) && this.fixed == false ){
this.startDrag();
}
}
onClipEvent(mouseUp){
if(this.hitTest(_root._xmouse, _root._ymouse)){
this.stopDrag();
if(_parent.dropZone1.hitTest(this._x, this._y, true)){
this._x = _parent.dropZone1._x;
this._y = _parent.dropZone1._y;
this.fixed = true;
_root.start_button.total++;
}else{
this._x = origX;
this._y = origY;
}
}
}
OR ... just include some constraint on the if statement to drag the object .... eg :: Code:
onClipEvent(load){
origX = this._x;
origY = this._y;
}
onClipEvent(mouseDown){
if(this.hitTest(_root._xmouse, _root._ymouse) && (this._x != _parent.dropZone1._x && this._y != _parent.dropZone1._y)){
this.startDrag();
}
}
onClipEvent(mouseUp){
if(this.hitTest(_root._xmouse, _root._ymouse)){
this.stopDrag();
if(_parent.dropZone1.hitTest(this._x, this._y, true)){
this._x = _parent.dropZone1._x;
this._y = _parent.dropZone1._y;
_root.start_button.total++;
}else{
this._x = origX;
this._y = origY;
}
}
}
Last edited by kuman; 06-05-2004 at 06:02 PM. |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Domain name drop cycle with picture illustration | starsearcher | Domain Names | 2 | 16-11-2006 04:23 PM |
| PageRank Drop | lcf | Other Internet Marketing Methods | 12 | 09-01-2005 08:28 PM |
| Reseller Hosting Price Drop | aodat2 | Paid Hosting Discussion Forum | 6 | 29-12-2004 08:39 PM |
| select box/drop down menu | hymns | Website Design | 4 | 21-07-2004 04:24 PM |
| camne nak buat coding utk drag gambar?? | twinky | Website Design | 8 | 06-10-2003 10:14 PM |
All times are GMT +8. The time now is 12:51 PM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.











Linear Mode

