1 Reply Latest reply: Jun 18, 2010 1:41 AM by Karthik R. RSS

    Interesting problem with Input text

    bestanimaster Community Member

      I ran across an interesting problem while working with Input text in Flash CS5. I created a flash movie actionscript 2. On the first page of the movie I have some input text and code to record the input text and store it in a variable. Also on the page I have a stop();

       

      When I export the movie to a swf to test it the input text fields are inoperable.

       

      I saved the movie, opened it in Flash CS4, tested the movie, and the input text fields work fine. No changes to the code on frame one.

       

      Has anyone else ran into situations using input text in flash CS5 in a flash movie set up for actionscript 2 ?

        • 1. Re: Interesting problem with Input text
          Karthik R. Community Member

          I was not able to reproduce the problem that u have mentioned. I was able to successfully add two text fields and assign the value from an Input text Field to the dynamic text field at run time.

           

          I added 2 text fields of type Input text field and Dynamic Text field. I named the instances as Inp_txt and Dyn_txt respectively. Pasted the following code on the actions layer and published the SWF. It seemed to work fine

           

          var myListener:Object = new Object();

          myListener.onKeyDown = myOnKeyDown;

          Key.addListener(myListener);

          my_btn.onPress = myOnPress;

           

           

          //text field///

           

          myListenerObject = new Object();

          myListenerObject.onChanged = function(txt) {

          //perform this when textfield value has changed

          if (Key.getCode()== Key.ENTER )

                          {

                          Dyn_txt.text=Inp_txt.text;

                          }

          }

           

           

           

          //call the TextField.addListener method to register the object

          Inp_txt.addListener(myListenerObject);

           

           

           

          As far as opening CS5 file with Flash CS4 is concerned, it is not possible to do so.