Flex / Flash“弹出气球”控制?

时间:2009-05-26 16:10:33

标签: flex flash components widget

我正在寻找一个Flash / Flex组件,它会创建一个“弹出式”编辑气球,类似于iCal或Google日历:

http://img.skitch.com/20090526-phb5mke61anjkfknaekdbjjefw.jpg http://osx.iusethis.com/screenshot/osx/ical.png

这样的事情存在吗?

2 个答案:

答案 0 :(得分:2)

Tooltip Control正是您所寻找的。您可能希望扩展该类以允许更高级的功能。

答案 1 :(得分:1)

气球弹出的代码很少。 Atul Yadav http://techy.limewebs.com

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="294" height="104" 
    backgroundAlpha="1.0" backgroundColor="#FFFFFF" borderColor="#1B86D1" 
    borderStyle="solid" creationComplete="DrowLine()">
<mx:Script>
    <![CDATA[
        import mx.controls.Alert;
        import mx.core.Application;
        import mx.managers.PopUpManager;
        private function OnClose():void{
            PopUpManager.removePopUp(this);
        }
        private function DrowLine():void{
                var pt:Point = new Point(0, -13);
                var global:Point = Application.application.localToGlobal(pt);
                var origin:Point =global;
                var destination:Point = new Point(150,0);
                var destination1:Point = new Point(50,0);
                var lineThickness:Number = 1;
                var lineColor:Number = 0x1B86D1;
                var lineAlpha:Number = 1;
                //Alert.show(global.toString());

                var tip:Canvas = new Canvas();

                tip.graphics.clear();
                tip.graphics.beginFill(0xffffff,1);

                tip.graphics.lineStyle(lineThickness,lineColor,lineAlpha);
                tip.graphics.moveTo(origin.x,origin.y);
                tip.graphics.lineTo(destination.x,destination.y);
                tip.graphics.lineStyle(1,0xffffff,lineAlpha);
                tip.graphics.lineTo(50,0);
                tip.graphics.lineStyle(1,0x1B86D1,1);
                tip.graphics.lineTo(origin.x,origin.y);
                tip.graphics.endFill();
                addChild(tip);

            }
    ]]>
</mx:Script>
    <mx:TextArea x="10" y="25" width="274" id="txt_message" borderColor="#2487CC"/>
    <mx:Label x="10" y="75" text="Attach:" width="54" fontWeight="bold" color="#000000"/>
    <mx:Button x="58" y="73" label="Browse" cornerRadius="0" borderColor="#288ACF" color="#4DB111"/>
    <mx:Button x="219" y="73" label="Save" id="btn_save" name="btn_save" cornerRadius="0" color="#15AE11" borderColor="#308FD1"/>
    <mx:Image x="272" y="2" width="18" height="18" source="assets/Close.PNG" click="OnClose()"/>

</mx:Canvas>