SLIDE 9 9
Nov-29-05 SMD157, High-Fidelity Prototyping 25 L
Clock Construction
- Five Layers
- Actions w/script
+ stop();
- Numerals, graphic
- Seconds, movie clip, w/script
+ onClipEvent (enterFrame) { theDate = new Date(); + _rotation = theDate.getSeconds()*6; }
- Minutes , movie clip, w/script
+ onClipEvent (enterFrame) { theDate = new Date(); + _rotation = theDate.getMinutes()*6 + theDate.getSeconds()/10; }
- Hours , movie clip, w/script
+ onClipEvent (enterFrame) { theDate = new Date(); + _rotation = theDate.getHours()*30 + theDate.getMinutes()/2; }
Nov-29-05 SMD157, High-Fidelity Prototyping 26 L
Organizing the Demo, 3 Scenes
- MainMenuScene
- Clock runs in the upper-left corner
- Transparent button there (_alpha = 0)
+ Press goes to GrowClockScene
- GrowClockScene
- Clock expands to fill screen
- Icons fade-out
- Transparent button for whole screen
+ Press goes to ShrinkScene
- ShrinkScene
- Clock shrinks to upper-left corner
- Icons fade-in
- Jumps to MainMenuScene at end
Nov-29-05 SMD157, High-Fidelity Prototyping 27 L
Resources
- The demo will be on the web
- Book:
- Kay, The Web Wizard’s Guide to FLASH, Addison-Wesley,
ISBN 0-201-76434.
- FLASH MX
- I used this, but others may be better