Need help Creating 1 drag for Multiple drops. Example of code below. I want to drag fruit into multiple (targets) containers that lock. Fruit can have multiple correct targets. I can this to work 1-on-1 but not multiple. Thanks!
This is code on frame 1. Movies Clip: Fruit Target: apple(correct), orange(correct), chair(Wrong) --------------- // Create 1 drag for Mutiple drop functionality fruit_mc.onPress = function() { this.startDrag(); }; fruit_mc.onRelease = function() { this.stopDrag(); if (this.hitTest(_root.fruit_targ_mc)) { this._x=555.6; this._y=123.5; _root.drag_txt.htmlText = "<b>Correct!"; } else if (this.hitTest(_root.start_targ_mc)) { this._x=556.6; this._y=302.4; _root.drag_txt.htmlText = "<b>Incorrect</b><br>Please Try again!"; } else { this._x=556.6; this._y=302.4; _root.drag_txt.htmlText = "<b>Incorrect</b><br>Please Try again!"; } }; fruit_mc.onPress = function() { this.startDrag(); }; fruit_mc.onRelease = function() { this.stopDrag(); if (this.hitTest(_root.apple_targ_mc)) { this._x=555.6; this._y=123.5; _root.drag_txt.htmlText = "<b>Correct!"; } else if (this.hitTest(_root.start_targ_mc)) { this._x=556.6; this._y=302.4; _root.drag_txt.htmlText = "<b>Incorrect</b><br>Please Try again!"; } else { this._x=556.6; this._y=302.4; _root.drag_txt.htmlText = "<b>Incorrect</b><br>Please Try again!"; } }; fruit_mc.onPress = function() { this.startDrag(); }; fruit_mc.onRelease = function() { this.stopDrag(); if (this.hitTest(_root.chair_targ_mc)) { this._x=555.6; this._y=123.5; _root.drag_txt.htmlText = "<b>Correct!"; } else if (this.hitTest(_root.start_targ_mc)) { this._x=556.6; this._y=302.4; _root.drag_txt.htmlText = "<b>Incorrect</b><br>Please Try again!"; } else { this._x=556.6; this._y=302.4; _root.drag_txt.htmlText = "<b>Incorrect</b><br>Please Try again!"; } }; __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com