?

Log in

No account? Create an account
o9soft.DEV [entries|archive|friends|userinfo]
o9software development forum

[ website | o9software's development server ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

(no subject) [Sep. 29th, 2005|03:48 pm]
o9software development forum

daitengu
I've got a simple form with a label, textinput, textarea, and button. The text in the textinput is appended to the text in the textarea when the button is pressed. The problem is that I can't access the textinput or textarea as expected. Below is my code. I got it to work by targeting it with _parent, but that seems unnecessary. What am I doing wrong?

Thanks in advance.

Actionscript:
import mx.controls.*;

class Test extends MovieClip
{
private var input_lbl:Label; // Just a label for the input textbox
private var input_ti:TextInput; // input field for entering text
private var output_ta:TextArea; // text area for displaying the entered text
private var go_btn:Button; // Button that triggers the event

function Test()
{
this.init();
}

private function init():Void
{
go_btn.onRelease = whenGoButtonClicked;
}

private function whenGoButtonClicked():Void
{
// This works, but I shouldn't have to do it this way
_parent.output_ta.text += _parent.input_ti.text + ", ";

// This doesn't work, and I don't know why
//output_ta.text += input_ti.text + ", ";
}
}
link1 comment|post comment

Timesheet v2.0beta [Feb. 26th, 2005|05:01 pm]
o9software development forum

o9software
Release announcement about timesheet v2.0 is now viewable on the main o9software blog.

http://www.livejournal.com/users/o9software/1144.html
linkpost comment

First Post [Oct. 26th, 2004|01:07 am]
o9software development forum

o9software
this is the frist post in the o9software development community.

hope to keep this alive
linkpost comment

navigation
[ viewing | most recent entries ]