remove "Flex Data Visualization Trial" using actionscript

Today Imtiyaz and I did a small hack in the Flex charting code and removed the Trial message from the Charting component by writing 1 simple actionscript lines.

what you need to do is in the creationcomplete of any charting component write the following code

//            var arra : Array = new Array();
//            for(var i:int =0;i<this.numChildren;i++){
//                arra.push(this.getChildAt(i));
//            }

// the above 4 lines are just to check  what r the childs added

(this.getChildAt(this.numChildren-1) as TextField).htmlText = ” “;

we  tried to set visible false but that dint work we also tried to remove the textfield child alltogether  but that too dint work :P but finally it was the html text property of the textfield that gave way :D

now you can also add your custom  trial message to your application :)

just replace the blank with your text for example:

(this.getChildAt(this.numChildren-1) as TextField).htmlText = ” YOUR MESSAGE”;

But its better that you buy your own licence key for charting. The above example was basically for educational purpose. have fun :)

trial

Share:
  • DZone
  • Digg
  • Twitter
  • Google Bookmarks
  • Technorati
  • StumbleUpon
  • MySpace
  • Sphinn
  • del.icio.us
  • Facebook
  • Reddit
  • Mixx

Related posts:

  1. Dynamically add remove columns in a datagrid i had a hard time figuring out how to add...

Related posts brought to you by Yet Another Related Posts Plugin.

Tags: , ,

6 comments

  1. Can you give an example for the same, Or the MXML code….

  2. Hi Pradeep,

    this is fairly simple and i will add the source later what you need to do in mxml is write ur charting component and test it when u are done with the chart and its showing exactly what u need now u can remove the trial text by calling a function in the creation complete of your chart and then use the above 4 lines to remove the msg.

    there is no direct method in MXML to achieve this, you have to write some AS code….

  3. @Laura many thanks. Afraid I don ‘t have time to sign up though it sounds interesting

  4. Doesn’t works with Barchart :(

  5. it doesn’t work for me, hmm…. it reports null object exception… could someone help me pls…

Leave a comment