ࡱ> Root Entryp|YrRASH`Contents Page 1Symbol 6O& !"#$%'Root Entryp|YrRASH81Contents Page 1Symbol 6O  !"#$%Symbol 5Symbol 8OSymbol 7 >  CDocumentPage Page 1Scene 1>8QT; Symbol 8square^MT;B^MT; Symbol 7circleSMT;@PT; Symbol 6 rectanglegIq9Iq9 Symbol 5clipK?q9  CDocumentPage Page 1Scene 1>8QT; Symbol 8square^MT;B^MT; Symbol 7circleSMT;@PT; Symbol 6 rectanglegIq9Iq9 Symbol 5clipK?q9?@ABCDEFGHIJKLMNOPQRCPicPage CPicLayer CPicFramew00_k0H[x0vZ0@4z@NB8p@t4q,XF81;8Ȥc?contentOCPicPage CPicLayer CPicFrame CPicShaf̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fx?Layer 1OCPicPage CPicLayer CPicFrameCPicText{$WX@7CPicPage CPicLayer CPicFrame CPicShape(ws!00`0`?Layer 1OArialg"variables functions clip events startDrag stopDrag Math>x @$Arial"(this movie demonstrates a little math, variables, and text field variables. the distance-calculation statements are defined on frame 1 of the main timeline. move the square and circle clips in the authoring tool, then export and play the .swf file to calculate the distance between the clips.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@"(U00>0`8 j8 (?content HHcircle square?clipsO?var c; // A convenient reference to the circle clip object var s; // A convenient reference to the square clip object var deltaX; // The horizontal distance between c and s var deltaY; // The vertical distance between c and s var dist; // The total distance between c and s c = _root.circle; // Get reference to the circle clip s = _root.square; // Get reference to the square clip deltaX = c._x -s._x; // Compute the horizontal distance between the clips deltaY = c._y -s._y; // Compute the vertical distance between the clips // The distance is the root of (deltaX squared plus deltaY squared). dist = Math.sqrt((deltaX *deltaX)+(deltaY *deltaY));scripts   Symbol 5clipK?q9Iq9*@hhhhhf33 Vector::External Font Files0Vector::Generator CommandVector::Preview as GIF0Vector::Override Sounds0Vector::Qualx3f̙xx3fެ6D E.' B3 P1OOx8<@f`zf*]2l$h