Figure 16-4. Custom Smart Clip communication
Communication between the interface .swf and the
Smart Clip occurs in a cycle. When a Smart Clip instance is selected
on stage, the corresponding interface .swf loads
into the Clip Parameters panel. The current parameters in the Smart
Clip instance are then passed to the .swf
file's xch instance. The
.swf file is expected to retrieve those
parameters and set the interface state accordingly. Subsequent
variables set in xch by the
.swf file are automatically passed to the Smart
Clip as parameters. When the Smart Clip instance is unselected, the
interface .swf is removed from the Clip
Parameters panel. However, the parameter values are not lost, they
are retained by the Smart Clip. Each time the Smart Clip instance is
selected, it passes its parameters back to the
.swf file's xch clip.
This cycle allows the interface .swf file to
stay synchronized with the Smart Clip parameters.
The following sections explain how to create the custom interface
.swf and associate it with a Smart Clip. A
sample Smart Clip with a customized user interface is available under
"Playhead Control" from the online Code Depot.