2 Replies Latest reply on Dec 4, 2007 12:27 PM by David_M..

    Implementation of Tearms & Condition

    FlexBond
      Hello friends

      I am working on a flex project and implementing a Terms & condition screen. In this screen i am using TextArea to insert terms & condition. Below this Tesxt Area there is an Accept button. On Clicking of this button i need to check if user has scrolled complete text in Text Area..

      Any Idea???

      Thanks
        • 1. Implementation of Tearms & Condition
          kcell Level 2
          If you have to nack the user with these kind of interactions, I would suggest a checkbox for accepting the text.
          ( Scrolling down has nothing todo with reading and understanding the text, othewise you have to implement something that users just can scroll with a "readable" speed and also than it is not save that users have understood the text)

          regards,
          kcell
          • 2. Re: Implementation of Tearms & Condition
            David_M..
            You just have to put a listener on the scroll event of your textArea which will test if you have scrolled all the way down and if it's the case you simply enable a checkbox (or set a boolean to true).

            <mx:TextArea id="ta" width="150" height="200" scroll="onScroll(event)" />
            <mx:CheckBox id="chk" enabled="false" />

            <mx:Script>
            <![CDATA[
            import mx.events.ScrollEvent;

            private function onScroll(event:ScrollEvent):void {
            if ( event.position == ta.maxVerticalScrollPosition ) {
            chk.enabled = true;
            }
            }
            ]]>
            </mx:Script>