• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter EIGHT. DECONSTRUCTION MANIFESTIVAL > STEP 09 combining SCRIPTS

STEP 09 combining SCRIPTS

Now let's open up the Script object again and look at the other scripts. The Rollover script and Rollout script have been made into "generic" scripts. They can be called by every Navigation button, yet will do different things for each. Simply set a few variables that affect the Rollout or Rollover script, and they change the behavior of the script. The reason one does this becomes apparent in large projects that can change during the development process. Suppose a client wants all the buttons to show a logo on the screen on rollover. Instead of going through every button script in the project, you can simply change one line in one script. In huge projects this can save hours.

creating the generic rollover action

You need to plan carefully to get the most out of object-oriented programming. Typically, you'll have one or more general routines that are maintained in the scripts object. Each of these series of actions must be designed so that it can accept variables from other objects. The variables are, in essence, the details of the general routine. By changing the routine's variables before you call a routine, you can change how that general routine behaves.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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