<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 325,  comments - 25,  trackbacks - 0

    內嵌資源:

      圖片
     a) 內聯方式內嵌:<mx:Button label="my button" icon="@Embed(source='myImage.gif')"/>
     b) 使用ActionScript綁定
        <mx:Script>
            <![CDATA[
                    [Embed(source="myImage.gif")]
                    [Bindable]
                    public var imaCls:Class;
            ]]>
        </mx:Script>
        <mx:Button label="my button" icon="{imgCls}"/>
    swf和音頻文件
        <mx:script>
           <![CDATA[
            [Embed(source="mySound.mp3")]
            [Bindable]
            public var mySound:Class;

            [Embed(source="mySWF.swf")]
            [Bindable]
            public var mySWF:Class;
           ]]>
        </mx:script>




    Flex 打印
    基本打印:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
      <![CDATA[
      import mx.printing.FlexPrintJob;   
      private function print():void {
        // create print job
        var printJob:FlexPrintJob = new FlexPrintJob();
        if(printJob.start()){
          // add page
          printJob.addObject(myLabel,"none");
          // send to printer
          printJob.send();
        }
      }
      ]]>
      </mx:Script>
      <mx:Label id="myLabel" text="Hello World" />
      <mx:Button click="print()" label="Print" />
    </mx:Application>

    打印多頁
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.printing.FlexPrintJob;
         private function print():void {
          // create print job
           var printJob:FlexPrintJob = new FlexPrintJob();
           if(printJob.start()){
            // add 2 pages
             printJob.addObject(page1,"none");
              printJob.addObject(page2,"none");
              // send to printer
             printJob.send();
           }
         }
        ]]>
      </mx:Script>
      <mx:Label id="page1" text="Hello World page 1" />
      <mx:Label id="page2" text="Hello World page 2" />
      <mx:Button click="print()" label="Print" />
    </mx:Application>

    打印表格數據
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="initData()">
      <mx:Script>
        <![CDATA[
        import mx.collections.ArrayCollection;
        import mx.printing.FlexPrintJob;
        [Bindable]
        public var dp:ArrayCollection;
        // populate the dataProviders for the datagrids
        private function initData():void{
          this.dp = new ArrayCollection();
          for(var i:Number=0; i<60; i++){
            this.dp.addItem({row:i,data:"item " + i});
          }
        }
        public function print():void {
          // create print job
          var printJob:FlexPrintJob = new FlexPrintJob();
          // start print job
          if(printJob.start()){
            // add the print grid
            printJob.addObject(printGrid);
            while(true) {
              // loop through print grids data and add additonal pages if neccessary
              printGrid.nextPage();
              if(!printGrid.validNextPage){
                printJob.addObject(printGrid);
                break;
              }
            }
            // send to printer
            printJob.send();
          }
        }
        ]]>
      </mx:Script>
      <mx:DataGrid id="dataGrid" dataProvider="{dp}" height="200" width="200">
        <mx:columns>
          <mx:DataGridColumn dataField="row" headerText="Row Number" />
          <mx:DataGridColumn dataField="data" headerText="Row Data" />
        </mx:columns>
      </mx:DataGrid>
      <mx:Button click="print()" label="Print" />
      <mx:PrintDataGrid visible="false" id="printGrid" dataProvider="{dp}" height="700" width="600">
        <mx:columns>
          <mx:DataGridColumn dataField="row" headerText="Row Number" />
          <mx:DataGridColumn dataField="data" headerText="Row Data" />
        </mx:columns>
      </mx:PrintDataGrid>
    </mx:Application>

    posted on 2011-03-16 09:16 長春語林科技 閱讀(246) 評論(0)  編輯  收藏 所屬分類: flex
    <2011年3月>
    272812345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789

     

    長春語林科技歡迎您!

    常用鏈接

    留言簿(6)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    相冊

    收藏夾

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲av永久无码精品网站 | a免费毛片在线播放| 亚洲高清资源在线观看| 亚洲区不卡顿区在线观看| 成人性生交大片免费看午夜a| 日韩免费人妻AV无码专区蜜桃| 国产精品黄页免费高清在线观看| 亚洲乱亚洲乱妇无码| 亚洲无砖砖区免费| 亚洲AV电影院在线观看| 国产亚洲日韩一区二区三区| 国产免费牲交视频| 免费激情视频网站| 免费无码又爽又刺激聊天APP| 中文字幕免费在线看线人 | 亚洲男人的天堂在线| 亚洲成AV人片在线观看ww| 亚洲色大成网站www永久一区 | 福利免费在线观看| 日本免费精品一区二区三区| 精品国产_亚洲人成在线| 亚洲日韩中文字幕无码一区| 最新亚洲精品国偷自产在线| 亚洲av乱码一区二区三区香蕉| 亚洲人成毛片线播放| 亚洲男人的天堂久久精品| 亚洲xxxxxx| 亚洲视频无码高清在线| 亚洲国产精品免费观看| 亚洲中文精品久久久久久不卡| 99热亚洲色精品国产88| 亚洲另类视频在线观看| youjizz亚洲| 亚洲人成网站18禁止| 亚洲av日韩专区在线观看| 亚洲老熟女五十路老熟女bbw| 亚洲精品9999久久久久无码| 亚洲精品第一国产综合亚AV| 特级一级毛片免费看| 国产精品永久免费| 美女视频黄a视频全免费网站色窝|