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

Chapter 12. Objects > Attaching Colors to Clips

Attaching Colors to Clips

Through scripting, you can use the Color object to apply color styles on any named instances the same way you can manually use the Properties panel. That is, you can color anything that you can give an instance name to—clips, buttons, or dynamic or input text. (To color video objects, however, just place them inside a clip). The process is analogous to using the Sound object. The Color object requires that you first instantiate an object through new Color(instance), where instance is the clip (or other instance type) that you want to affect. Then use one of the two methods—setRGB() or setTransform()—to cause the instance to change. It really is that simple. It’s just that when you want to perform elaborate effects, there are additional details—as you’ll see in the following section, “Using the Color Transform Method.”

Simple Coloring

Here’s the simple version of coloring a clip using the Color object. First, instantiate the Color object and specify a target instance, as follows:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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