Hi,

Here is a small implemntation :
There is a little problem : the event is distributed "before" the scroll,
so, you can add a blank line to your texarea, and check if the scroll
percentage is greater than 99% ;)



<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009";
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="library://ns.adobe.com/flex/mx"
   creationComplete="init(event)" height="768" width="1024">
 <fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import mx.events.PropertyChangeEvent;

protected function handle(event:PropertyChangeEvent):void
{
_chx.selected = (_sc.scroller.verticalScrollBar.value ==
_sc.scroller.verticalScrollBar.maximum);
 }
 protected function init(event:FlexEvent):void
{
for (var i:Number=1; i<20 ;i++)
{
_sc.text += 'Alea Jacta Est\n';
}
_sc.scroller.viewport.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE,
handle);
}
   ]]>
</fx:Script>
 <s:VGroup>
<s:TextArea id="_sc" />
<s:CheckBox id="_chx" selected="false" />
</s:VGroup>

</s:WindowedApplication>

2015-03-09 20:07 GMT+01:00 <[email protected]>:

> I'm trying to implement a clickwrap agreement wherein a user must scroll
> to the bottom of a spark TextArea or RichEditableText box in order to
> enable a checkbox that must be selected to a Terms of Service (TOS)
> contract. This ensures the TOS at least passed by the user's eyes before
> agreeing to it (of course, we can never be sure the user actually read it).
>
> What can I use to determine that user has scrolled to the bottom of the
> text area, so that I can enable the checkbox? Thanks for any comments.
>

Reply via email to