Jul 23

牡丹江站长不知道有多少,想找哪个站长也很麻烦

今天跟朋友商量一下,建个群,把牡丹江的站长都邀请进来一起交流

群号:24602385

欢迎牡丹江的各位站长加入! 

written by Toby \\ tags: ,

Jul 12
 The following example shows how you can change the item background 
roll over color for a Flex ComboBox control by setting the rollOverColor style.
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”
        layout=”vertical”
        verticalAlign=”top”
        backgroundColor=”white”>

    <mx:Array id=”arr”>
        <mx:Object label=”One” />
        <mx:Object label=”Two” />
        <mx:Object label=”Three” />
        <mx:Object label=”Four” />
        <mx:Object label=”Five” />
        <mx:Object label=”Six” />
        <mx:Object label=”Seven” />
        <mx:Object label=”Eight” />
        <mx:Object label=”Nine” />
        <mx:Object label=”Ten” />
    </mx:Array>

    <mx:ApplicationControlBar dock=”true”>
        <mx:Form styleName=”plain”>
            <mx:FormItem label=”rollOverColor:”>
                <mx:ColorPicker id=”colorPicker”
                        selectedColor=”#CCCCCC” />
            </mx:FormItem>
        </mx:Form>
    </mx:ApplicationControlBar>

    <mx:ComboBox id=”comboBox”
            dataProvider=”{arr}”
            rollOverColor=”{colorPicker.selectedColor}” />

</mx:Application>
You can also set the rollOverColor style using an external .CSS file or <mx:Style /> 
block,as seen in the following example:
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”
        layout=”vertical”
        verticalAlign=”top”
        backgroundColor=”white”>

    <mx:Style>
        ComboBox {
            rollOverColor: #CCCCCC;
        }
    </mx:Style>

    <mx:Array id=”arr”>
        <mx:Object label=”One” />
        <mx:Object label=”Two” />
        <mx:Object label=”Three” />
        <mx:Object label=”Four” />
        <mx:Object label=”Five” />
        <mx:Object label=”Six” />
        <mx:Object label=”Seven” />
        <mx:Object label=”Eight” />
        <mx:Object label=”Nine” />
        <mx:Object label=”Ten” />
    </mx:Array>

    <mx:ComboBox id=”comboBox”
            dataProvider=”{arr}” />

</mx:Application>
Or, you can set the rollOverColor style using ActionScript,
as seen in the following example:
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”
        layout=”vertical”
        verticalAlign=”top”
        backgroundColor=”white”>

    <mx:Script>
        <![CDATA[
            import mx.events.ColorPickerEvent;

            private function colorPicker_change(evt:ColorPickerEvent):void {
                comboBox.setStyle("rollOverColor", evt.color);
            }
        ]]>
    </mx:Script>

    <mx:Array id=”arr”>
        <mx:Object label=”One” />
        <mx:Object label=”Two” />
        <mx:Object label=”Three” />
        <mx:Object label=”Four” />
        <mx:Object label=”Five” />
        <mx:Object label=”Six” />
        <mx:Object label=”Seven” />
        <mx:Object label=”Eight” />
        <mx:Object label=”Nine” />
        <mx:Object label=”Ten” />
    </mx:Array>

    <mx:ApplicationControlBar dock=”true”>
        <mx:Form styleName=”plain”>
            <mx:FormItem label=”rollOverColor:”>
                <mx:ColorPicker id=”colorPicker”
                        change=”colorPicker_change(event);” />
            </mx:FormItem>
        </mx:Form>
    </mx:ApplicationControlBar>

    <mx:ComboBox id=”comboBox”
            dataProvider=”{arr}” />

</mx:Application>
Due to popular demand, here is the “same” example in a more ActionScript 
friendly format:

 
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”
        layout=”vertical”
        verticalAlign=”top”
        backgroundColor=”white”
        initialize=”init();”>

    <mx:Script>
        <![CDATA[
            import mx.containers.ApplicationControlBar;
            import mx.containers.Form;
            import mx.containers.FormItem;
            import mx.controls.ColorPicker;
            import mx.controls.ComboBox;
            import mx.events.ColorPickerEvent;

            private var arr:Array;
            private var colorPicker:ColorPicker;
            private var comboBox:ComboBox;

            private function init():void {
                arr = [];
                arr.push({label:”One”});
                arr.push({label:”Two”});
                arr.push({label:”Three”});
                arr.push({label:”Four”});
                arr.push({label:”Five”});
                arr.push({label:”Six”});
                arr.push({label:”Seven”});
                arr.push({label:”Eight”});
                arr.push({label:”Nine”});
                arr.push({label:”Ten”});

                colorPicker = new ColorPicker();
                colorPicker.addEventListener();

                var formItem:FormItem = new FormItem();
                formItem.label = “rollOverColor:”;
                formItem.addChild(colorPicker);

                var form:Form = new Form();
                form.styleName = “plain”;
                form.addChild(formItem);

                var appControlBar:ApplicationControlBar;
                appControlBar = new ApplicationControlBar();
                appControlBar.dock = true;
                appControlBar.addChild(form);
                Application.application.addChildAt(appControlBar, 0);

                comboBox = new ComboBox();
                comboBox.dataProvider = arr;
                addChild(comboBox);
            }

            private function colorPicker_change(evt:ColorPickerEvent):void {
                comboBox.setStyle(”rollOverColor”, evt.color);
            }
        ]]>
    </mx:Script>

</mx:Application>

written by Toby \\ tags: , ,

Jul 07

http://www.adobeflexbuilder.cn
http://www.flexbuilder.com.cn
http://www.flexplayer.com.cn
http://www.flexcms.cn
http://www.flexfans.cn

adobeflexbuilder.com没人注册,想注册的抓紧啊,我留个CN的就可以了,哈~~~

再有就是flexcms.org也不错,想注册的朋友抓紧`~~

written by Toby \\ tags: ,

Jun 08

Demo : earth3d

原文在这里:Create the Earth and heavens in less than an hour with

刚才玩了会,效果很酷~~

英文教程对于我来说有点难了,得慢慢看细细的研究才能明白一些

不得不说一句,很好很3D!呵呵

不聊了,得赶紧去实践一下

written by Toby

Jun 08
<?xml version=”1.0″ encoding=”utf-8″?>
<!– http://blog.flexexamples.com/2008/06/05/aligning-headers-in-a-datechooser-control-in-flex/ –>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”
        layout=”vertical”
        verticalAlign=”middle”
        backgroundColor=”white” viewSourceURL=”srcview/index.html>

    <mx:Script>
        <![CDATA[
            import mx.events.ListEvent;

            private function comboBox_change(evt:ListEvent):void {
                var cssObj:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".customTextAlignLabel");
                cssObj.setStyle("textAlign", evt.currentTarget.selectedItem);
            }
        ]]>
    </mx:Script>

    <mx:Style>
        FormItem {
            labelStyleName: customTextAlignLabel;
        }

        .customTextAlignLabel {
            textAlign: left;
        }
    </mx:Style>

    <mx:ApplicationControlBar dock=”true>
        <mx:Form styleName=”plain>
            <mx:FormItem label=”textAlign:>
                <mx:ComboBox id=”comboBox”
                        dataProvider=”[left,center,right]”
                        change=”comboBox_change(event);/>
            </mx:FormItem>
        </mx:Form>
    </mx:ApplicationControlBar>

    <mx:Form>
        <mx:FormItem label=”Button>
            <mx:TextInput />
        </mx:FormItem>
        <mx:FormItem label=”ButtonBar>
            <mx:TextInput />
        </mx:FormItem>
        <mx:FormItem label=”CheckBox>
            <mx:TextInput />
        </mx:FormItem>
        <mx:FormItem label=”ColorPicker>
            <mx:TextInput />
        </mx:FormItem>
        <mx:FormItem label=”ComboBox>
            <mx:TextInput />
        </mx:FormItem>
    </mx:Form>

</mx:Application>

an class=”MXMLComponent_Tag”></mx:Application>

Demo: FormItem container

written by Toby

Jun 07

Andrew Trice在这里展示了一个很Coole的图像/视频做遮罩(Mask)的例子,并且还专门写了一篇关于如何实现这种效果(Mask)的教程

 

视频遮罩DEMO

图像遮罩DEMO

图像遮罩DEMO的源码

written by Toby