ࡱ> Root Entryp|YrRASHp+ê Contents Page 1Symbol 2  Root Entryp|YrRASHyê ContentsPage 1Symbol 2  !"#$%Symbol 1+Symbol 1+  !"#$%&'()*+CPicPage CPicLayer CPicFrame CPicShape-*<<,<,*<,<,*<<7+9878}+8 y8}8 y)8987)T-h-[88-V[8hWT8V8Layer 1Oock. // CPicPage CPicLayer CPicFrame?// See Chapter 13 of "ActionScript for Flash MX: The Definitive Guide" // for a step-by-step tutorial on building this clock. // Create clock face and hands attachMovie("clockFace", "clockFace_mc", 0); attachMovie("hand", "secondHand_mc", 3); attachMovie("hand", "minuteHand_mc", 2); attachMovie("hand", "hourHand_mc", 1); // Position and size the clock face clockFace_mc._x = 275; clockFace_mc._y = 200; clockFace_mc._height = 150; clockFace_mc._width = 150; // Position, size, and color the clock hands secondHand_mc._x = clockFace_mc._x; secondHand_mc._y = clockFace_mc._y; secondHand_mc._height = clockFace_mc._height / 2.2; secondHandColor = new Color(secondHand_mc); secondHandColor.setRGB(0xFFFFFF); minuteHand_mc._x = clockFace_mc._x; minuteHand_mc._y = clockFace_mc._y; minuteHand_mc._height = clockFace_mc._height / 2.5; hourHand_mc._x = clockFace_mc._x; hourHand_mc._y = clockFace_mc._y; hourHand_mc._height = clockFace_mc._height / 3.5; // Update the rotation of hands with each passing frame function updateClock () { var now = new Date(); var dayPercent = (now.getHours() > 12 ? now.getHours() - 12 : now.getHours()) / 12; var hourPercent = now.getMinutes()/60; var minutePercent = now.getSeconds()/60; hourHand_mc._rotation = 360 * dayPercent + hourPercent * (360 / 12); minuteHand_mc._rotation = 360 * hourPercent; secondHand_mc._rotation = 360 * minutePercent; } // Update the clock every 100 milliseconds setInterval(updateClock, 100); scriptsOt; } ?updateClock();?gotoAndPlay  CDocumentPage Page 1Scene 1(::E+u> 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`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`hWYT8h-8Y <~ <