Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I cannot access my component ... :-s

Status
Not open for further replies.

steiff

Programmer
Apr 23, 2004
1
BE
Hi,

I'm stucked for 2 days on something that seemed very simple but it wasn't ...

I'm belgian and I don't speak very well English so I'll try to expose my problem in a simple language and copied the code here under ... I've also made a sample .fla file because I think it will be easier to follow this in a real environment.

The problem is the following :

I want to display a little window (movieclip) containing a multiline inputbox (textArea composant) allowing user to enter a value that I'll manipulate later on. I also should display a default text in this box.

I made a movieclip named 'entryBox' et I made it appear with the 'attachmovie' method. This clip is named 'entryBoxMC'. As this clip is made in the _root level I think it's logic to say this 'entryBoxMC' named clip should be accessible at the _root level ...

The textArea component is in the 'entryBoxMC' clip and is named 'textBox' and here also I think it's logic to say this textArea should be accessible with this path : _root.entryBoxMC.textBox.text (according to the help section) ... but nothing is working here ...

I first thought it was a scope problem and that I was using a wrong path to this component and created a natif dynamic textBox and named the variable 'varTest'. I tried to access this with this path : _root.entryBoxMC.varTest ... guess what ? This works well ...

So I'll try to make a more schematic approach :

[(_root-level - Frame 1)]
this.attachMovie("entryBox","entryBoxMC", this.getNextHighestDepth());

// display this text in textArea component 'entryBoxMC'
this.entryBoxMC.textBox.text = "this is not working ...";

//and this is working ....
this.entryBoxMC.varTest = "but this is working !!!";

[(Library)]
Movieclip named 'entryBox' containing :
- textArea named 'textBox'
- natif dyanmic textbox

The sample fla file can be downloaded at the following URL :

So I think this the best way to define my problem and I hope you'll be able to resolve this issue ...

1000 X thank you
Stephane - KO-Tek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top