Flash Player 7
Gives the designer the ability to create a multi selection toggle button with various styles and highlighting effects. You can group buttons together similar to radio buttons but with additional functionality. You can also load library symbols and even external .jpgs and .swfs to be displayed in your button. This would be a simple way to create an image thumbnailer.
| Method |
Description |
|---|---|
| adds a new state to the button with the parameters passed |
|
| removes all states of the button clearing all labels, data, tooltips and icons |
|
| returns an object for the current state of the button |
|
| allows you to pass a TextFormat object to allow better manipulation of the font displayed on the button |
|
| sets the button to a specific state, using this method will not fire an onchange event |
| Event |
Description |
|---|---|
| invoked when the button is released after a ClickPress event |
|
| invoked when the mouse button is pressed while on the button |
|
| invoked when the button receives focus |
|
| invoked when the button looses focus |
|
| invoked when the mouse leaves the button |
|
| invoked when the mouse is placed over the button |
|
| invoked when the button is selected by either the user clicking on the button, or setting the State property or isSelected property via actionscript |
| Property |
Description |
|---|---|
| the default background coloration of the button |
|
| specifies which color to use for the border when drawing a 2D button |
|
| specifies which color to use for the highlight when drawing a 3D button |
|
| specifies which color to use for the shadow when drawing a 3D button |
|
| specifies the buttons drawable border in pixels |
|
| specifys how many pixels should be indented when drawing a curve or the slant when drawing a slanted side |
|
| allows you to quickly retrieve or set the data corrispoding to the current state of the button |
|
| array of data elements, each one corrisponding to a different state |
|
| background color to use when the .enabled property is set to false |
|
| font color to use when the .enabled property is set to false |
|
| specifies which effect to use when the mouse is placed over the button and removed from the button. this can be any one of the following:BUBBLES,FADEIN,GLOW,HIGHLIGHT,PULSE,SPACE,SLIDE DOWN,SLIDE LEFT,SLIDE RIGHT,SLIDE UP |
|
| the coloration of the stars or bubles when using the .effect property is set to STARS or BUBBLES |
|
| font face to use for the font on the button |
|
| if set to true the displayed font for the label will be bolded |
|
| font color to use on the button when it is in normal state |
|
| font color to use on the mouse is over the button |
|
| font color to use when the button is a selected state |
|
| font color to use for a behind font effect, useful for making the letters on the button appear as shadowed or knockout |
|
| a number which adjusts the x,y offset to place the font shadow behind the main font use a positive number for shadow and negative for knockout |
|
| font size to display on the button |
|
| if set to true the text will wrap to multiple lines |
|
| By specifying the same group name for multiple buttons, the button will act like a radio button group, when one is selected, the others will unselect. If the button has multiple states, the second state will always be initially selected and when toggled thru, the first state will never become active untill the button is no longer selected. |
|
| background color of the button when the mouse is over the button |
|
| returns a reference to the currently loaded icon which will allow you to access properties and modify frame information you can also quickly change the icon by specifying a string value of a library linked id to load |
|
| array of icons, each one corrisponding to a different state |
|
| the size to resize the icons to in pixels the resized icon will maintain its aspect ratio |
|
| number of pixels from the left to place the icon at, a value of -1 will center the icon horizontally |
|
| number of pixels from the top to place the icon at, a value of -1 will center the icon vertically |
|
| states if the button is currently selected |
|
| allows you to quickly retrieve or set the displayed label for the current state |
|
| array of labels, each one corrisponding to a different state |
|
| setting this property will allow the button to remain in the same physical state but will disable all mouse events to and from the button |
|
| Setting this will cause the tooltip to keep this constant height, a value of 0 will make the tip expand and contract the height as needed |
|
| Setting this will cause the tooltip to keep this constant width, a value of 0 will make the tip expand and contract the width as needed |
|
| Setting this will cause the tooltip to keep position at this x location, a value of 0 will align to the x position of the mouse |
|
| Setting this will cause the tooltip to keep position at this y location, a value of 0 will align to the y coordinate of the mouse |
|
| the background coloration of the button when the button .isSelected is true and .toggle is set to true or the button has a groupName |
|
| specifies how to draw the left side of the button this can be any one of the following:LINE,CORNERCURVE,CURVELEFT,CURVERIGHT,SLANTLEFT,SLANTRIGHT you may also set the to a function, when doing so the button will call your function when it needs to draw the left or bottom shape of the button. The function will be passed the following ("b",dclip,xMin,yMin,xMax,yMax); "b" or "l" for bottom or left, When passed the "l" side the first call must be a dclip.moveTo(), dclip a reference to the canvas, xMin,xMax,yMin,yMax current dimmensions of the button. |
|
| specifies how to draw the right side of the button this can be any one of the following:LINE,CORNERCURVE,CURVELEFT,CURVERIGHT,SLANTLEFT,SLANTRIGHT you may also set the to a function, when doing so the button will call your function when it needs to draw the left or bottom shape of the button. The function will be passed the following ("b",dclip,xMin,yMin,xMax,yMax); "r" or "t" for right or top, dclip a reference to the canvas, xMin,xMax,yMin,yMax current dimmensions of the button. |
|
| allows you to modify the appearence of the different themes the range is from -2.0 to +2.0 |
|
| the current state of the button 1 to the max number of labels,data, or icons specified |
|
| specifies what type of button border to draw this can be any one of the following:2D,2D_INSERT,3D_SUNK,3D_RAISED,DISPLACED |
|
| specifies if the text should be center, left, or right aligned on the button |
|
| specifies how many pixels the text should be indented before doing its alignment |
|
| specifies what type of button background to draw this can be any one of the following:SOLID,GEL,GLOSS,MARBLE,SHINE,GRADIENT if you specify something else the button will attempt to call a function by that name and pass it the following arguments (button,color,width,height button is a reference to the button, color specifies which color sould currently be used for the theme |
|
| when set to true, a button can become selectable when the user clicks on it. |
|
| allows you to quickly retrieve or set the tooltip corrispoding to the current state of the button |
|
| array of tool tips, each one corrisponding to a different state this can be regular or html formatted text |
|
| if set to true the button will use the Macromedia global coloration styles |