24_Gio_Hoc_Flash_2267_89039819

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x = _root._xmouse + xOffset; this._y = _root._ymouse + yOffset; } } onClipEvent (mouseUp) { if (this.hitTest(_root._xmouse, _root._ymouse)) { // don't follow the mouse any longer dragging = false; } } Hãy xem movie th y khác bi t gi a 2 o n code. 3) Kéo và th Bây gi ta ã bi t kéo movie, v y ta s th nó âu.? V n là b n mu n theo dõi hành ng c a ngư i s d ng và xác inh ngư i s dung t movie âu. Basic Drop Zone Ch c năng hitTest có th ư c s d ng xác o n mã sau, chúgn ta s d ng l nh startDrag ta có th t p trung vào các ch c năng m i. nh khi MC b è lên nhau. Trong o n mã kéo th ơn gi n i, nh ó Trong o n mã sau, ch c năng hitTest ư c s d ng so sánh MC ư c kéo v i m t movie khác tên là dragZone trên m t lêvl(root level) CODE onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse)) { this.startDrag(); } } onClipEvent (mouseUp) { if (this.hitTest(_root._xmouse, _root._ymouse)) { this.stopDrag(); // see if this mc is inside the dropZone mc if (this.hitTest(...
View Full Document

This note was uploaded on 01/16/2013 for the course BANKING 111 taught by Professor Johnsmith during the Spring '13 term at University of Economics and Technology.

Ask a homework question - tutors are online