View Full Version : Legal agreement scroll bar
corbo950
07-01-2008, 12:31 AM
How do I enable and undim a agree button only after then agreement had been fully scrolled. my application is based on %s not pixel widths so i need 2 like figure out the max possible scroll on the scroll bar of a text area and then when it has been achived make a agree button undim and become active how would i go about doing this? thanks alot
drkstr
07-01-2008, 04:15 AM
Try this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="800" height="600" backgroundColor="#ffffff" >
<mx:Script>
<![CDATA[
[Bindable]
private var myText:String = "A paragraph typically consists of a unifying main point, thought, or idea accompanied by supporting details. The non-fiction paragraph usually begins with the general and moves towards the more specific so as to advance an argument or point of view. Each paragraph builds on what came before and lays the ground for what comes next. Paragraphs generally range three to seven sentences all combined in a single paragraphed statement. In prose fiction and literary writing paragraph structure is more abstract, depending on the writer's technique and the action of the narrative. Facts and parts of the narrative are ordered to achieve poignancy and support rhetorical devices. A paragraph in prose fiction can start with a single detail and enlarge the picture with successive details, for example; but it is just as common for the point of a prose paragraph to occur in the middle or the end. A paragraph can be as short as one word or run the length of multiple pages, and may consist of one or many sentences. When dialogue is being quoted in fiction, a new paragraph is used each time the person being quoted changes.";
[Bindable]
private var myScrollDone:Boolean = false;
private function onTextScroll( ): void {
if( !myScrollDone && idTextArea.mx_internal::getTextField().scrollV >= idTextArea.mx_internal::getTextField().maxScrollV-1 ) {
myScrollDone = true;
}
}
]]>
</mx:Script>
<mx:VBox>
<mx:TextArea id="idTextArea" text="{myText}" width="200" height="200" scroll="onTextScroll();" />
<mx:Label text="{(myScrollDone)? 'All done!' : 'Keep goin!'}" />
</mx:VBox>
</mx:Application>
Best Regards,
~Aaron
corbo950
07-02-2008, 03:29 AM
That will work great thanks
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.