Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-12-2002, 08:35 PM   #1
njcalugar
Registered User
 
Join Date: Nov 2002
Location: San Diego, CA
Posts: 4
Send a message via AIM to njcalugar
Angry frustrated with listBox

I am having problems with the ListBox component. I can't seem to call any
methods on the ListBox but I can set properties just fine:

ListBox._visible = false; // this makes the list box disappear

ListBox._width = 10; // this sets the width to be 10

ListBox.addItem("this is a label", "this is data"); // doesn't do anything

Can somebody please help.

Nicholas Calugar
[email protected]
njcalugar is offline   Reply With Quote
Old 11-13-2002, 01:18 AM   #2
Neablas
Registered User
 
Join Date: Nov 2002
Posts: 2
Default

I think you're just having a naming problem.

Make sure you've named the listbox.

Go in the Properties menu (if you are using MX) it should say something like Component and a text input under that. In the text input it should say <Instance Name>, delete that then enter Listbox1, then try this.

ListBox1._visible = true; // this makes the list box disappear
ListBox1._width = 10; // this sets the width to be 10
ListBox1.addItem("this is a label", "this is data"); // doesn't do anything


best regards
Neablas is offline   Reply With Quote
Old 11-13-2002, 02:07 AM   #3
njcalugar
Registered User
 
Join Date: Nov 2002
Location: San Diego, CA
Posts: 4
Send a message via AIM to njcalugar
Default

I should have explained further:

1) The listBox is named and is part of a movie clip.

2) The movie clip is in a flash movie.

3) The movie clip includes a .as file in the first frame.

4) The listBox is created in Frame 10.

5) If I put action script in Frame 10, I can use the methods on the listBox.

6) I am writing a method in the .as file that tries to manipulate the listBox:
The method is outputting debug messages fine.
The method can alter the listBox's properties fine.
The method calls functions on the listBox and these calls DON"T WORK

The main idea here is that from the external ActionScript code won't run functions on the listBox but will allow property adjustment. The functions on the listBox work if I call them from within the ActionScript.

Is that any clearer?
njcalugar is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:45 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.