| 7 | | * In the 5.x API the addButton/removeButton functionality cannot be used to present ''toggles''. When calling the ''remove'' and then the ''add'', an updated button will not display. It is easier to have access to the button icon itself, so that can be updated. The callback handler generally doesn't change with toggles. |
| 8 | | * Rollovers are currently not supported, for neither controlbar nor dock buttons. |
| 9 | | * Controlbar buttons are positioned differently from ''regular'' controlbar buttons in that they are assigned a certain amount of padding. This prevents the creation of custom buttons for e.g. the '''Bekle''' skin. In a refactored API, this padding should be removed. |
| 10 | | * Dock buttons are hard to style, because the plugin / skin has no control over the text that's added to it. It is better to discard the texts, requiring plugin developers to incorporate this text into the button graphics. That way, plugin developers / skin designers have far more control over their dock buttons. |
| | 9 | Example call using the dock (the controlbar can also be used): |
| 18 | | * Bitrate switching: one could present a dropdown with options (''320p'', ''480p'', ''720p'', ''auto''). One could also pop up a dialog with some additional info about bitrate switching (some more help, plus the qualitymonitor settings). |
| 19 | | * Closed captions: one could present a dropdown with options (''english'', ''spanish'', ''disabled''). One could also pop up a dialog in which these settings can be made, as well as options to change the fontsize / background, or download the captions. |
| | 23 | * '''id''': Identifier of the button. If a button with an existing id is used, the button is replaced. |
| | 24 | * '''handler''': Javascript function that is executed when the button is clicked. |
| | 25 | * '''outGraphic''': URL to the button graphic image (preferably PNG b/c of its transparency). Plugins will generally want to skin this. |
| | 26 | * '''overGraphic''': URL to the button graphic image when the mouse is over the button. If not provided, there's no rollover. |
| 21 | | A pro of dropdown menus is that they are fairly small UI wise, and don't require a click. A con is that they don't work in mobile devices (rollover) and that they'd probably only work for controlbar icons (not dock icons). |
| | 28 | === Enhancements === |
| | 29 | |
| | 30 | This setButton() call contains several enhancements over the current AS3 addButton() function. |
| | 31 | |
| | 32 | * Buttons are not colorized anymore by the skin. This fixes *wash out* colorizing issues. |
| | 33 | * Buttons can be replaced by calling setButton() with the same id. This allows for (multi)toggles. |
| | 34 | * The PNG is the whole button, not just the icon part. This allows for more flexible skinning (no more margin). |
| | 35 | * Dock buttons contain just the icon, not the icon+text combo. This allows for more flexible skinning (control over text). |
| | 36 | |
| | 37 | === Compatibility === |
| | 38 | |
| | 39 | By using a different function name, this feature can remain compatible with the AS3 addButton(). Inside Flash, this call can probably re-use much of the AS3 code. |
| | 40 | |
| | 41 | Since the mechanism produces fairly different results as the AS3 addButton(), we do not introduce it in the AS3 API now (perhaps in 6.0?). |