1 Reply Latest reply on Dec 8, 2006 3:14 PM by Flashpuke23423

    Keypress on componets (yet another item flash can't do)

    Flashpuke23423 Level 1
      yet again, something that is one line of code in other languages that flash can't do....

      1. Write component
      2. I want to respond to a keypress to a movie clip or other item in the component (say an input field or other movie clip)

      this.onKeyPress only works when defined from root. i.e. mc.onKeyPress() = function....

      How the fukkk am I do to this from a component?

      And I don't want a keylistener, as I don't want one in every class/component. And no, I don't want code on the root. The point is to have an encapsulated compoent.

      Can this be done, or is flash a crap development tool. Time to use Java applets, Flash soooo sucks at anything other than making pretty pictures.
        • 1. Re: Keypress on componets (yet another item flash can't do)
          Flashpuke23423 Level 1
          Here's the problem in a nutshell

          class myComp extends MovieClip
          {
          private function onRelease()
          { trace ("the mouse clicked the comp on the stage")}

          private funcion onKeyUp()
          {
          trace ("this event should fire for a keypress when the comp ahs the focus, but it does not because Flash sucks azzz");
          }

          }

          }

          Only the top works.

          the kicker is the onKeyUp is in blue just like onRelease, becaues the intellisense is so craaapppy in Flash.

          Way to go Adobe! Better crank out more bloated versions of Reader. 30 Meg programs to read 10k files.