0 Replies Latest reply on Mar 14, 2012 11:39 PM by jayteemoney

    I want to know how to clear the text area by the push off my next question button and ask a new ques

    jayteemoney Level 1

      I want to know how to clear the text area by the push off my next question button and ask a new question - also I want to know how to code in my project to where a user can enter a math question in one border container and the answer enters into the next container

      heres my code so far

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                     xmlns:s="library://ns.adobe.com/flex/spark"

                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" backgroundColor="#1E5C75">

         

          <fx:Script>

              <![CDATA[

                  protected function button1_clickHandler(event:MouseEvent):void

                  {

                      //convert text area into labelid to be identified by actionscript

                      richTextLabel.text = myArea.text;

                     

                  }

              ]]>

          </fx:Script>

         

          <fx:Declarations>

              <!-- Place non-visual elements (e.g., services, value objects) here -->

          </fx:Declarations>

          <!--container 1-->

          <s:BorderContainer borderWeight="7" x="28" y="10" width="200" height="138">

              <s:layout>

                  <s:VerticalLayout paddingTop="10" paddingBottom="10"

                                    paddingLeft="10" paddingRight="10"/>

              </s:layout>

              <!--data Entry control-->

              <s:TextArea id="myArea" width="153" height="68"/>

              <!--end of data entry control-->

              <s:Button width="151" label="ask a question" click="button1_clickHandler(event)"/>

             

             

          </s:BorderContainer>

         

         

          <!--container2-->

          <s:BorderContainer borderWeight="7" x="509" y="10" width="200" height="138">

              <s:layout>

                  <s:VerticalLayout paddingTop="10" paddingBottom="10"

                                    paddingLeft="10" paddingRight="10"/>

              </s:layout>

            

      <!--data entry control-->

             

              <!--convert tne data entry control into a label id in actionscript-->

              <s:Label id="richTextLabel" width="153" height="68"/>

              <s:Button width="151" label="next question" click="button1_clickHandler(event)"/>

             

          </s:BorderContainer>

         

          </s:Application>