5 Replies Latest reply on Mar 21, 2010 12:42 PM by kglad

    TextFields are blocking my buttons


      I've been creating a calculator as part of an assignment. I've created button instances in actionscript and then putting a text field over it. The problem is the text field blocks my button so it is difficult to press.


      exaple code:


      var equals_btn:equals = new equals();
      equals_btn.x = 247;
      equals_btn.y = 369.9;
      equals_btn.width = 115;
      equals_btn.height = 45;

      var equalText = new TextField();
      equalText.x = 276.1;
      equalText.y = 349.9;
      equalText.width = 53.3;
      equalText.height = 76.9;
      var equalfor = new TextFormat();
      equalfor.font = "Verdana";
      equalfor.size = 60;
      equalfor.bold = true;
      equalfor.color = 0xffffff;
      equalText.defaultTextFormat = equalfor;
      equalText.text = "=";

      When I create the button on stage and add static text over it on a new layer, I do not get this problem. Creating everything in actionscript will get me more marks so I would like to fix the problem.


      Anyone got any ideas? Feel like I'm missing somthing obvious but any help would be much appreciated.