Wenchuan Earthquake: chengdu Earthquake China AIR runtime installer, error 2038
May 21

Though it is a very simple tip.May you guys already know how can we create dynamic button in flash as we create textfield dynamically using this MovieClip.createTextField(), In this article, it shows how to creat dynamical button in actionscript. No design tools will be used, it is just actionscript code. Ok, let’s see the following code, hope it is what you are looking for and will be helpful to you.

// paint
var G:Array = [[0, 0], [80, 0], [80, 20], [0, 20], [0, 0]];
this.createEmptyMovieClip(”btn”,0);
btn.beginFill(”0×000000″,100);
for (i=0; i i == 0 ? btn.moveTo(G[i][0], G[i][1]) : btn.lineTo(G[i][0], G[i][1]);
}
btn.endFill();
// set button position
btn._x = (Stage.width/2)-btn._width/2;
btn._y = (Stage.height/2)-btn._height/2;
// button methon
btn.onRelease = function() {
getURL(http://dobeweb.com, “_blank”);
};
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • description
  • E-mail this story to a friend!
  • Furl
  • Live
  • NewsVine
  • Reddit
  • StumbleUpon
  • Technorati

written by Flex \\ tags: , , , ,

Leave a Reply