Hello again, I have rectified the bead, maybe now it is more correct?
(I share it in case someone is interested.)
import org.apache.royale.core.IStrand;
import org.apache.royale.jewel.Label;
import org.apache.royale.events.MouseEvent;
import org.apache.royale.jewel.beads.controls.Badge;
[Event(name="click", type="org.apache.royale.events.MouseEvent")]
/**
* The Badge class provides a small status descriptors for UI elements.
*
* A Badge is an onscreen notification element consists of a small
circle,
* typically containing a number or other characters, that appears in
* proximity to another object
*
* The BadgeOnClick class is a Badge extension that dispatches the
MouseClick Event.
*/
public class BadgeOnClick extends Badge
{
public function BadgeOnClick()
{
super();
}
/**
* used to create the badge ui element
* that will be a Label
*/
override protected function createBadge():Label
{
var badge:Label = new Label();
badge.typeNames = "jewel badge";
badge.addEventListener("click", function():void{
dispatchEvent(new MouseEvent("click"));
});
return badge;
}
public override function set strand(value:IStrand):void
{
super.strand = value;
}
}
Thx.
Hiedra.