Home > Reference > Widgets > Media > ClipControl

ClipControl

The ClipControl widget controls any movieClip object in Flash, changing the properties of the clip (e.g. width, x or y position, alpha, frame number, etc.) based on input values from another widget. For example, the output value from an AnalogInput widget monitoring a proximity sensor can control the left/right (x property) position of a graphic across the screen to reflect the position of a person in relation to a wall. In addition, more than one property of a clip (scale and alpha for example) can be controlled by having multiple ClipControl widgets control the same clip.

Since the values used by ClipControl are directly translated into the property of the clip, be sure the widget or code sending values to ClipControl are in the appropriate range. For example, if you are using AnalogInput as the inputSource, and you are controlling the horizontal position of a graphic, you should set the MIN of AnalogInput to 0 and the MAX to the width of the Flash movie. In this case, an incoming value of 0 would put the graphic at the left side of the screen, and if the screen is 640 pixels wide, then an incoming value of 640 would position the graphic at the right side of the screen (note that the registration point of the clip the exact positioning). See the individual properties listed below for their appropriate ranges.

On-screen Features

  • IN: Shows the instance name of the inputSource and the values coming from it
  • OUT: Shows the instance name of the clip and the property of the clip being controlled
  • THE PROPERTY: the property of the movieClip that will be affected.
    • width/height: 0 to the maximum pixels of width/height desired
    • scale: 0 to the maximum percentage scale. Eg. 200% will make the clip twice its normal size. negative numbers will work, reversing and inverting the clip.
    • x, y, z: 0 to the maximum horizontal or vertical position desired. Note that for x, zero is on the left of the screen; for y, zero is at the top of the screen; for z, zero is normal and higher numbers are away from the screen. Negative numbers for x and y will place the clip off the screen to the left or above.Negative numbers for z will seem to put the clip closer to the viewer.
    • rotation, rotationX, rotationY, rotationZ: 0 to 360 indicating the number of degrees rotation. Multiples of 360 rotate the clip a full revolution. Similarly, negative numbers rotate counterclockwise in multiples of 360.The X,Y and Z version of rotation operate in 3D space and only work in Flash CS4 or above.
    • alpha: 0 to 100, where 0 is completely transparent, and 100 is completely opaque
    • frame no: 1 to the highest frame in the clip. This setting will position the clip to a specific frame number of the clip’s timeline
    • blur: varies the amount of blur, where zero is no blur, and higher numbers increase the amount of blur
    • shadow: sets the angle of a drop shadow from 0 to 360.

Parameters

  • CLIP: the instance name of the movieClip you want to control
  • INVISIBLE: If set to “true” or checked, the widget will disappear when the Flash movie is run - NOTE: you can make all the widgets invisible interactively when the Flash moving is running by pressing the backslash key “\”
  • INPUT SOURCE the instance name of the source the widget listens to, e.g AnalogInput

Last modified March 24th, 2011