posts - 13,comments - 19,trackbacks - 0
          Flex Chart 技巧 - 移除浮水印 (中國人真聰明啊!)
          Flex Chart 雖然有提供完整的試用功能
          不過編譯完成的圖表會加上浮水印
          Flex Data Visualization Trial
          

          以上的浮水印其實是以 AS3 動態加上的

          既然是 AS,那事情就簡單了
          只要在 Flex Project 內自行加上以下 Class
        1. package mx.charts.chartClasses {
        2.  public class ChartsLicenseHandler {
        3.  }
        4. }
        5.  

          然後在 MXML 內明確引用該 Class,或是用 Metadata Tag 強迫編譯
          這樣就可以去除浮水印了~!

          1. <?xml version="1.0"?>
          2. <mx:Application backgroundColor="#DDDDDD"
          3.   xmlns:mx="http://www.adobe.com/2006/mxml">
          4.  <mx:Script>
          5.   <![CDATA[
          6.   
          7.   [Frame(extraClass="mx.charts.chartClasses.ChartsLicenseHandler")]
          8.   
          9.   import mx.collections.ArrayCollection;
          10.   
          11.   [Bindable]
          12.   private var expensesAC:ArrayCollection = new ArrayCollection( [
          13.    { Month: "Jan", Profit: -200, Expenses: 1500, Amount: 500 },
          14.    { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
          15.    { Month: "Mar", Profit: 1500, Expenses: -500, Amount: 300 } ]);
          16.   ]]>
          17.  </mx:Script>
          18.  
          19.  <mx:SolidColor id="sc1" color="blue" alpha=".3"/>
          20.  <mx:SolidColor id="sc2" color="red" alpha=".3"/>
          21.  <mx:SolidColor id="sc3" color="green" alpha=".3"/>
          22.  
          23.  <mx:Stroke id="s1" color="blue" weight="1"/>
          24.  <mx:Stroke id="s2" color="red" weight="1"/>
          25.  <mx:Stroke id="s3" color="green" weight="1"/>
          26.  
          27.  <mx:Panel title="PlotChart Control Example" height="100%" width="100%">
          28.   <mx:PlotChart id="plot" height="100%" width="100%"
          29.     paddingLeft="5" paddingRight="5"
          30.     showDataTips="true" dataProvider="{expensesAC}" >
          31.    <mx:series>
          32.     <mx:PlotSeries xField="Expenses" yField="Profit"
          33.      displayName="Plot 1" fill="{sc1}" stroke="{s1}" />
          34.     <mx:PlotSeries xField="Amount" yField="Expenses"
          35.      displayName="Plot 2" fill="{sc2}" stroke="{s2}" />
          36.     <mx:PlotSeries xField="Profit" yField="Amount"
          37.      displayName="Plot 3" fill="{sc3}" stroke="{s3}" />
          38.    </mx:series>
          39.   </mx:PlotChart>
          40.  </mx:Panel>
          41. </mx:Application>
          posted on 2009-02-27 15:20 南山隱士 閱讀(2179) 評論(3)  編輯  收藏

          FeedBack:
          # re: Flex中如何去掉水印(轉帖)[未登錄]
          2009-04-23 10:17 | 菜鳥
          大俠救命啊,我是菜鳥,急!!!

          我照你說的弄,可是第7行[Frame(extraClass="mx.charts.chartClasses.ChartsLicenseHandler")]
          有個錯誤:Metadata requires an associated definition.  回復  更多評論
            
          # re: Flex中如何去掉水印(轉帖)
          2009-05-06 13:04 | 南山隱士
          @菜鳥
          mx.charts.chartClasses.ChartsLicenseHandler
          這是一個類,你建這么一個類就可以了,里面什么都不用寫  回復  更多評論
            
          # re: Flex中如何去掉水印(轉帖)
          2011-03-04 19:18 | 地方
          @南山隱士
          那是空的類啊,什么都么寫啊,也報那個錯呢。  回復  更多評論
            

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 二手房| 日照市| 鲁山县| 连山| 哈巴河县| 中牟县| 荣昌县| 时尚| 怀柔区| 博爱县| 九龙县| 潞西市| 铅山县| 县级市| 衡东县| 陇川县| 许昌县| 武宁县| 黑河市| 宁晋县| 钟山县| 舞钢市| 溧阳市| 台中县| 湘乡市| 乐亭县| 忻城县| 宝坻区| 陆丰市| 房山区| 贵溪市| 聂荣县| 崇文区| 老河口市| 凤城市| 青岛市| 茌平县| 雅安市| 榕江县| 新竹县| 游戏|