flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From modjkl...@comcast.net
Subject Re: how enable checkbox when scroll to bottom of Spark TextArea?
Date Tue, 10 Mar 2015 13:05:36 GMT

Wonderful, thanks Evyatar 

----- Original Message -----

From: "Evyatar Ben Halevi-Arbib" <evyatarbh@gmail.com> 
To: "users@flex apache. org" <users@flex.apache.org> 
Sent: Tuesday, March 10, 2015 1:21:55 AM 
Subject: Re: how enable checkbox when scroll to bottom of Spark TextArea? 

Hey, 

We had something similar in our application, only an enabling a button, and 
the web version of it was as follows - 

protected function creationCompleteHandler(event:FlexEvent):void{ 
scroller.verticalScrollBar.addEventListener(Event.CHANGE,changeHandler,false,0,true); 
scroller.verticalScrollBar.addEventListener(FlexEvent.CHANGE_END,changeHandler,false,0,true);

scroller.verticalScrollBar.addEventListener(FlexEvent.SHOW,changeHandler,false,0,true); 
scroller.verticalScrollBar.addEventListener(KeyboardEvent.KEY_UP,changeHandler,false,0,true);

} 

public function changeHandler(event:Event=null):void { 
agreeButton.enabled = !scroller.verticalScrollBar.visible || 
scroller.verticalScrollBar.value == scroller.verticalScrollBar.maximum; 
if(agreeButton.enabled){ 
scroller.verticalScrollBar.removeEventListener(Event.CHANGE,changeHandler); 
scroller.verticalScrollBar.removeEventListener(FlexEvent.CHANGE_END,changeHandler); 
scroller.verticalScrollBar.removeEventListener(FlexEvent.SHOW,changeHandler); 
scroller.verticalScrollBar.removeEventListener(KeyboardEvent.KEY_UP,changeHandler); 
} 
} 

Good luck, 
Evyatar 

On Mon, Mar 9, 2015 at 9:07 PM, <modjklist@comcast.net> wrote: 

> 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. 
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message