• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Summary

This workshop chapter explored how to write a relatively simple script and then convert it into a component. The process involved first creating a hard-wired script that worked to our satisfaction. Then we identified the aspects of the script that were not ideal—especially the fact that all the code was in the main timeline and there were several hard-wired numbers. We also tried to think of generic applications for this component, such as allowing the author to specify an initial percentage.

For more information about relative references, refer to Chapter 1, “Flash Basics,” and Chapter 4, “Basic Programming in Flash.” You can find general information about how to identify ways to improve scripts in Chapter 3, “The Programmer’s Approach.” Writing functions was discussed in Chapter 8, “Functions.” Finally, Chapter 5, “Programming Structures,” covered if statements and how to write expressions such as our formula that determines percentage.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint