ࡱ> Root Entryp|YrRASH; Contents Page 1Symbol 2  'Root Entryp|YrRASH\; ContentsPage 1Symbol 2  !"#$%&Symbol 1+Symbol 1+  !"#$%&'()*+,-./01CPicPage CPicLayer CPicFrame CPicShape-*<<,<,*<,<,*<<7+9878}+8 y8}8 y)8987)T-h-[88-V[8hWT8V8Layer 1Oock. // CPicPage CPicLayer CPicFrame?7// see chapter 13 of "actionscript: the definitive guide" // for a step-by-step tutorial on building this clock. // Create clock face and hands attachMovie("clockFace", "clockFace", 0); attachMovie("hand", "secondHand", 3); attachMovie("hand", "minuteHand", 2); attachMovie("hand", "hourHand", 1); // Position and size the clock face clockFace._x = 275; clockFace._y = 200; clockFace._height = 150; clockFace._width = 150; // Position, size, and color the clock hands secondHand._X = clockFace._x; secondHand._y = clockFace._y; secondHand._height = clockFace._height / 2.2; secondHandColor = new Color(secondHand); secondHandColor.setRGB(0xFFFFFF); minuteHand._x = clockFace._x; minuteHand._y = clockFace._y; minuteHand._height = clockFace._height / 2.5; hourHand._x = clockFace._x; hourHand._y = clockFace._y; hourHand._height = clockFace._height / 3.5; // Update the rotation of hands with each passing frame function updateClock () { var now = new Date(); // When calculating dayPercent in example 13-4 of // asdg, we use the conditional operator (?:) to // convert the range of getHours(), from // 0-23 to 0-12. Here we use the more concise modulo // operator to convert from the range 0-23 to 0-11 (both // 0 and 12 become 0). var dayPercent = (now.getHours() % 12) / 12; var hourPercent = now.getMinutes() / 60; var minutePercent = now.getSeconds() / 60; hourHand._rotation = 360 * dayPercent + hourPercent * (360 / 12); minuteHand._rotation = 360 * hourPercent; secondHand._rotation = 360 * minutePercent; } ?updateClock();?gotoAndPlay(2);scriptsO  CDocumentPage Page 1Scene 1(::Eф; Symbol 2hand::Lhand ; Symbol 1 clockFace::J clockFace;*@hhhhh Vector::Template"PublishFormatProperties::generator 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`f3xffxfxfxxfkhWYT8h-8Y <~ <