ࡱ> Root EntryRoot Entryp|YrRASHdContentsTPage 1 Symbol 6G Symbol 5  !"#$%&'()*+,-./0123456789:;<=>?@ABCCPicPage CPicLayer CPicFramew00_k0H[x0vZ0@4z@NB8p@t4q,XF81;8Ȥc?contentOCPicPage CPicLayer CPicFrame CPicShapeެ6̙s0500H0p?Layer 1OCPicPage CPicLayer CPicFrameCPicText{$WX@7Arialg"variables functions clip events startDrag stopDrag Math> @LArial"(this movie demonstrates a little math, variables, movie clip events, functions, text field variables, and dragging movie clips. the distance calculation function is defined on frame 1 of the main timeline. clip event handlers on each movie clip take care of the dragging feature and the automatic update of the distance information.F+O0@Arial@"draggable distance%|0@ Arial@"tcalculator CPicSpriteW" W" b b W" ,,W" W" W" F%F%W" ,,W" 10a& X@Arialf"(distance between clips Arialf"(total: horizontal: vertical:/ 8XdistArial@"( c8XdeltaXArial@"( 8XdeltaYArial@"(qU00>0`8 j8 (?var deltaX; var deltaY; var totalDist; function calcDist() { deltaX = Math.round(clip1._x - clip2._x); deltaY = Math.round(clip1._y - clip2._y); dist = Math.round(Math.sqrt((deltaX * deltaX) + (deltaY * deltaY))); }content -FonClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.startDrag(true); } } onClipEvent (mouseUp) { this.stopDrag(); }clip1 ` P/P` onClipEvent (mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, true)) { this.startDrag(true); } } onClipEvent (mouseUp) { this.stopDrag(); } onClipEvent (mouseMove) { _root.calcDist(); }clip2?clipsO CDocumentPage Page 1Scene 1>8Kq9 Symbol 6 rectanglegIq9Iq9 Symbol 5clipK?q9Iq9*@hhhhhf33 Vector::External Font Files0Vector::Generator CommandVector::Preview as GIF0Vector::Override Sounds0Vector::Quality50Vector::Protect0Vector::TemplateVector::Omit Trace Actions0Vector::TopDown0Vector::Report0"PublishFormatProperties::generatorVector::Event Format0Vector::Stream Compress7Vector::Version5Vector::Event Compress7Vector::Stream Format0PropSheet::ActiveTab1599 CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ff0xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx3f̙xx3fެ6D E.' B3 P1OOx8<@f`zf*]2l$h