Disable Selected Items In Listbox Component
Hello Friends, I have a project about video library. In this movie videos's names lited in listbox and catagorywise. I need to make a function to create if the movie is purchased, the video name should be enable, else disable in the listbox. Please give me solution for it.your friendHimanshu vyas
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 02-08-2008, 02:09 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Set Selected Items In Listbox To None?
Hi there, just a quick one this, the title probably explains my question sufficiently, I just want to deselect everything in a listbox. I have tried:
ActionScript Code:
myList_list.selectedItem = null;myList_list.selectedItem = undefined;
but it wont work.
Would someone let me know the correct syntax pls?
Thanks,
Schm
Multiple Items Selected In A Listbox...
I have a list box that I want the user to be able to select more that one option in the list and all the items he or she selects I want to put into a dynamic text field.
How do I do this. I have the next code but it doesn't put all the items selected into my dynamic text. It only puts the first item selected.
list = this.getSelectedItems();
for (i=0; i<list.length; i++) {
trace(list.label);
products_txt.text = list.label
}
thanks for any help received.
Brenda S.
Listbox Multiline Selected
Hi all,
I'm using Flash MX.
I'm trying to create a scrollable navigation menu using a listbox component, populated by an XML file. I'm using a listbox instead of a textbox because I need to handle onclick events.
Occationally, a menu item will be longer than one line. By default, the listbox will not wrap the text. Obviously I would like the text to wrap.
I was able to add the following lines of code to the FLabel symbol in the component library...
this.labelField.wordWrap = true;
this.labelField.multiline = true;
this.labelField.autoSize = true;
This works until the menu item is selected. Once selected, the item appears to return back to a single line.
Is it possible to make a listbox more multiline friendly?
Thanks in advance.
Joe
Deleting The Selected Item In A Listbox
list.removeItemAt () <-- how can I set this parameter so that it only deletes the selected item? I understand that I can place an integer (say 4) there, but then it only deletes whatever is in place 4. What if the 3rd place were highlighted?
Is there a way that I can modify this script so that the parameter slot will understand that it is supposed to delete place 3 (or 2 or 12)?
I really appreciate you reading this whole thing - thank you -
Sam
Listbox-multiple Selection, Last Selected Item
I have a listbox with that has the multiple selection working.
I can change the color of the selection using
sf = new FStyleFormat();
sf.selection = 0x87CEEB
but I want to be able to highlight(or show something besides the selection color) on the Last selected item.
Is there anyway this can be done?
Setting Selected Item Of Listbox To Be Visible At The Top
I have a listBox of items (t-shirt designs) that has a scroll bar due to the number of items in the list.
I can pass in an ID to the flash file which will cause it to display the correct design (example here: http://www.futurefreak.co.uk/catalog...roducts_id=153 ) and I then set the listBox's selectedIndex to be the current design.
code: _root.listBox.setSelectedIndex( _root.currentdesign );
This hi-lights the design in the listBox - but if the selected item in the list isn't on screen due to the amount of items in the list - then you need to scroll down to see the selected item.
Is there any way that I can force the selected index in the listBox to "jump" to the top of the list so that it's visible each time I call setSelectedIndex?
Changing Items In A Combobox After Selected
Greetings all,
i have a quick question that i'm pretty certain is possible, i'm just not certain of the exact code as to how to do it...
i have a combobox (actually 2, but if i can get it to work for one, i'm certain i can get it to work for both), where i have the default line "Affiliates" at the top so it is what appears to the user. Then below I have a list of 3 affiliates.
What I was wanting to do was to have "Affiliates" listed initially, but when the user clicks the combo, I didn't want it to actually appear in the list...
how would i go about this?
at worst, i want it to not appear after the user selected an affiliate from the list for the first time...
TIA.
De-selecting Items In ListBox
I have a simple form with a listbox - my question is this:
When a user clicks on a selection how can I set it up so that if they click on it again it de-selects the item? I didn't see any methods for the listbox component that would allow me to do this. Anyone know how I might go about doing this?
Thanks!
Listbox: Add Items In Different Colors
Hi,
I got a working way of adding items to a listbox, but i would really love to add pieces of text in different colors.
Say, one button adds 'you clicked the blue button', and the other adds 'you clicked the red button'.
Is this possible?
My current code:
on(release){
history.addItemAt(0, "boring black text");
}
How To Put Multiple Selected Items Of A List To An Array?
Hello,
I tried to use a List to do something. I know how to add items to the list. Here's my codes:
Quote:
import fl.controls.List;
import fl.events.ListEvent;
//Add Items to List
myList.addItem( {label: "Item 1" } );
myList.addItem( {label: "Item 2" } );
myList.addItem( {label: "item 3" } );
myList.addItem( {label: "Item 4 } );
myList.addItem( {label: "Item 5" } );
myList.allowMultipleSelection = true;
The list allow users to select multiple items. My question is:
When a user select multiple items (e.g. Item 1, Item 3 and Item 4). How can I put the selected items into an Array for further manipulation.
P.S. I know how to put the selected items into another list. However this is not what I want.
Thanks and best regards
Alex
Switch Items Between 2 Listbox Components
I have two listbox components on the stage, sitegroups and member groups. I also have two pushbutton components, add and remove. I want to place event handler code on the add and remove pushbuttons that move the selected item(s) from one box to the other and vice versa. Simple right?
So here is my code, which does not work exactly:
function addGroup(){
/*
trace(sitegroups.getSelectedItem().label);
trace(sitegroups.getSelectedItem().data);
*/
sitegroups.removeItemAt(sitegroups.getSelectedItem ())
membergroups.addItem(sitegroups.getSelectedItem(). label,sitegroups.getSelectedItem().label);
}
function removeGroup(){
membergroups.removeItemAt(membergroups.getSelected Item())
sitegroups.addItem(label,data)
}
Plz Help Drag Drop Listbox Items
hi frnds,
can anyone help me with a drag drop problem. I want to move items from one list box to another by dragging and dropping them.
If anyone have tried this before then please guide me how to do that..
Thanx in advace
Zeeshan.
Select Items In Html Listbox?
Hey Folks,
I am not really sure where/if this fits in to the user forum topics -
it actually may be a better question for an html forum, but I am
sticking with the tried and true...
I have a html page with a listbox that contains several items.
I can load the page with AS, but can somebody tell me how, if
even possible, to load the page with one or more of the items
selected?
For instance, the listbox on the html page contains 4 items:
car, boat, truck, motorcycle
I would like to know how to load that page AND have "car" and
"truck" selected.
Listbox Items Doesn't Show Up =/
i'm doing this for a school project and i need some help... see, the when u click on "Admissions" > "Entry Requirements" and go to the "International" tab, somehow the listbox items doesn't show up... the listbox movie is loaded externally, and the code to load it is in the "Entry Requirements" button inside the "Admissions" movieclip... pls help thx very much!
*attached a .fla file
How To Link To Other Scene Accoding To Items Selected In Combo Box?
hi,
does anyone know how to link to other scene in my movie according to the items selected from my combo box? For example, if "Scene A" is selected(from combo box), it will automatically display Scene A after i click on my GO button....
Attached here is the fla file which i dont know how to continue.
Any help will be greatly appreciated.
thank you.
Selecting Items From A 'select Multiple' Listbox
Hello everyone,
I know how to select '1' item from a listbox if I set the listbox property 'SelectMultiple=False'. How do I go about selecting multiple items once I set the property to 'true'?
I know I have to go thru a loop. I just dont know what attribute to use.
Thanks,
Raymond
[F8] Adding Items To A Listbox Embedded In A Movieclip
Hi all,
The movie clip I'm attaching has a text field (called module) and a listbox (called issuesBox) in it.
On stage I have a button with the following code:
Code:
on(click){
for (i=0;i<=5;i++) {
var newClip:MovieClip = _root.attachMovie("mc", "mc"+i, i,{_x:50,_y:yval});
newClip.module.text="title";
for (j=0;j<=10;j++) {
newClip.issuesBox.addItem("hi");
}
}
}
At runtime I get 5 movie clips with the text field filled with "title," like I hoped for. However, the listbox isn't getting filled 10 times like I thought it would. Any suggestions?
Thanks!
Permanently Highlighting Items Inside A Listbox?
Hey guys,
Came across yet another obstacle today and was wondering. How would i permanently highlight specific items stored within a list box (flash component) if, say an error occured. Moreover, how would i highlight them red instead of green?
Loading Items From A Text File Into A Listbox.
As the title suggest I am wondering how do you load the contents of a text file into a listbox component. My text file is formatted like this.
item1
item2
item3
...
...
...
Thx in advance...
How To Disable Combo Box 2 When The First Radio Button Is Selected
hi there, i need some help in controlling the combo box. i have 2 components on the stage the first one is the radio button(Male) and the other is radio button (female). then i have 2 combo boxes. what i want to do is when the user click on the radio button (Male), the radio button (femal e) and its combo box partner will be disabled. i tried to use the .enabled property but the problem is when the I want to select the radio button (female) instead of radio button (Male) it doesnt go back to being enabled.
and another question is, what code should i use so whenever i click on any of the options in the combo box, it will then go to the scene that i assigned it to. please help me out. thanks for helpin!
Urgent - Disable Listbox Selection
i need to disable an mx(not mx2004) listbox component while the swf is talking to a php to avoid a flood of data.
how do i disable it?
mylistbox.enabled = false; doesn't work
i mean, you cannot select while disabled.
this is quite urgent.
thx a million
Listbox Switcher: Move Items From Listbox1 To Listbox2 & Vice Versa
I have two listbox components side by side. "listbox1_mc" contains a list of users. "listbox2_mc" is empty.
I would like to create the code to allow the user to select one or many users from listbox1_mc and drag and drop them into listbox2_mc and vice versa (ie, once a user has been dropped into listbox2_mc, they can be removed and dropped back into listbox1_mc.
I will also have arrows ( < > ) between the listboxes to allow the user to manually move selected users between the two boxes if they don't use drag and drop (same end, different means).
JSFL - Disable Linkage Identifiers For All The Items In The Library
Hi all,
I'm creating a JSFL to disable linkage identifiers for all items in the library, but it isn't working.
What's wrong in this code?
Code:
function disableLinkageIdentifier() {
fl.trace("Disable linkage identifier");
fl.trace("-----------------------------------------------------------");
var dom = fl.getDocumentDOM();
if (dom == null) { alert("No Open Document"); return; }
var lib = dom.library;
var libItems = lib.items;
fl.trace("Items in library: " + lib.items.length);
// create list of items that need updating:
var updateCount = 0;
var l = libItems.length;
for (var i = 0;i<l;i++) {
var uItem = libItems[i];
fl.trace("Examining "+(i+1)+" of "+l+": "+uItem.name+" ("+uItem.itemType+")");
fl.trace(" -- Prepared library item: "+uItem.name);
uItem.linkageImportForRS = false;
uItem.linkageExportForAS = false;
uItem.linkageExportForRS = false;
uItem.linkageExportInFirstFrame = false;
updateCount++;
}
fl.trace("-----------------------------------------------------------");
fl.trace("Prepared "+updateCount+" of "+l+" library items");
fl.trace("-----------------------------------------------------------");
}
disableLinkageIdentifier();
Thanks a lot
Individual Listbox Items Linking To Individual External Text Files?
Alright, I've been at this for a while now, and I'm stumped. I've gotten as far as getting a listbox with a list of articles to display the articles in a dynamic text box, only i can only get it to work if i use one huge external text file that contains all the articles. what i want is to have each item on the list open up its own external text file, i.e. for each item on the list, there exists a separate text file. Can anyone offer any insight into this? I'm about ready to put my fist through the monitor, and that would suck because this is a really nice monitor
Thanks!
Individual Listbox Items Linking To Individual External Text Files?
Alright, I've been at this for a while now, and I'm stumped. I've gotten as far as getting a listbox with a list of articles to display the articles in a dynamic text box, only i can only get it to work if i use one huge external text file that contains all the articles. what i want is to have each item on the list open up its own external text file, i.e. for each item on the list, there exists a separate text file. Can anyone offer any insight into this? I'm about ready to put my fist through the monitor, and that would suck because this is a really nice monitor
Thanks!
Listbox Component?
I have a listbox on the stage named "lst_amenities". I'm tring to trace out an array of selected items from a multiple selection listBox. Problem is that i am getting an output of [objectObject] throughout the array. Below is the code that i used. Anyone have any ideas?
Code:
lst_amenities.setChangeHandler("select_amenities");
ary_amenities = ["string 1", "string 2", "string 3", "string 4"];
create_amenities(ary_amenities);
function create_amenities(ary) {
for (i=0; i<ary.length; i++) {
lst_amenities.addItem(ary[i]);
}
lst_amenities.setSelectMultiple(true);
lst_amenities.sortItemsBy("label", "ASC");
}
function select_amenities() {
ary_amenities = lst_amenities.getSelectedItems();
trace(ary_amenities);
}
Help With Listbox Component
I need to use a listbox component to set a variable in the root movie. I've input my labels and data, but am perplexed as to how to go about getting the selected item to be the variable value. The name of my listbox menu is "CampusValue" and the name of my variable in the root movie is called "campus". How do I use the Change Handler in the Property Inspector? Do I call a function there or something? I couldn't get much from the Help section on this. Thanks.
Listbox Component
I am having a problem with the listbox compnent. Can anyone tell me how to get the listbox labels to display text in a text box when clicked?
thanks
Tab Component And Listbox
i'm loading a movie when i push a tab
this movie has a combobox in it, the problem is that the rows of the combobox isn't appearing
the first row does, all others not. the dataprovider is full???
in the same movie that the combobox is located is a datagrid.
the same thing happend when i placed the datagrid direct in the movie where the tab is located, the dataprovider was full, the layout of the grid was made but the rows where empty.?????
has someone had the same problem and probably a solution???
thx
marcel
Help With The Component (listbox)
Hello i have a problem with the listbox, when i putted it in a movieclip in frame 10, and i want to add a item in my _root.
it doesnt display in the listbox.
When i put in this code:
_root.mainmenu.itemc.addItem("Potion", 50);
it wont add the item but it does add the item if the listbox is on frame1 in my movieclip, how can i solve this so it adds when on frame 10 too?
sorry but my english sucks atm
Ui Component Help: ListBox
Hello all,
I am having some difficulty setting up a listbox that when a label is selected it loads an external .txt file into a dynamic text field.
EXAMPLE:
_listbox- instance name "letters" ,contains letters a-j
_dynamic text- instance name "dynaText", has a scrollbar attacthed
_external .txt files are labeled a.txt - j.txt
_all .txt files are in the same folder as the .swf
_all instances and script are placed on frame 1 of layer 1 in scene 1
_Here is a portion of the script i was trying (and failing) to use-
if (letters == "a") {
dynaText = dynaText.load("a.txt");
}
I am almost too embarassed to post that crappy script but I am desperate for help. If I can find or be shown the solution I'll make a tutorial (if there isn't one and of course giving full credit to whomever assisted me ^^) so this question never has to come up again. Thank you in advance.
p-spiddy
EDIT: I forgot to mention that I am using Flash 6.
Listbox Component
How do I add a whole list of items to the Listbox component which all load different parts of a movieclip? There must be a really simple way to do it but i've never used one before. I can add the items, but just need to know how i can make each one goto a different part of the MC.
Cheers
ListBox Component
I am having a problem getting my down arrow on my keyboard to recognize the listbox component upon loading. I always have to press the down arrow 2 times the first time instead of once to get the highlight in the listbox to move to the next item? i'm not sure if it is a focus problem or not. the listbox component loads into the main movie on a seperate level.
thanks in advance,
Mike
ListBox Component
Code:
on(click){
formData = new LoadVars();
receiveData = new LoadVars();
cObjectArray = c.selectedItems();
for (var i = 0; i < cObjectArray.length; i++)
{
currentC = cObjectArray[i];
formData.country[i] = currentC.label;
}
formData.sendAndLoad("http://localhost/file.php", receiveData, "post");
}
I'm trying to get an array of the selected items of 'c' (an instanse of the List component named c), and then send those selected variables to the php, well the php stuff works ok, but I can't get the multiple selected variables
i've tried diferent stuff like sending a var like formData.tmp = c.selectedIndiced(); and other but all only shows 'undefined' as value.
Any example of how to manage selected values of list box?
thnkx in advance
ListBox Component
Does anyone know how to make the listbox component display so that only one option displays at a time?
Thanks.
Listbox Component
HI there...
I know that this must be basic --- When I use the List component
and added some labeles eg: Start movie 1, Start movie 2, Start Movie 3,,,,
How do I them apply the _root.pictures1. gogotoAndPlay("go");
_root.pictures2. gogotoAndPlay("go");
_root.pictures3. gogotoAndPlay("go");
Its quite simple but can someone help, didnt have luck finding
some tutors
Have a nice day:-)
Flemmming
[MX] ListBox Component
Hello,
I'm using this code to put an array into a listbox component in Flash MX
Code:
stop;
campbellAry = new Array("charlie","chris","kate","kara","jack","kathy","kim","fiona","liam",
"cesar","kaylee","john","ken","sarah","reykah");
campbellAry.sort();
for (i=0; i<campbellAry.length; i++) {
testListBox.addItem(campbellAry[i] /* + " campbell" */ );
}
I'm wondering how to give each item in the list a function? For example I'd like charlie to do something associated with the name of that item (ie loadMovie charlie.swf). How do I dynamically control each item's onRelease method's ?
Also, can I give the text a different look in the listBox somehow?
Thanks
Listbox Component?
I am wondering if someone could please tell me how I can put names into a listbox component. Thanks in advance.
ListBox Component : Need Serious Help
Hi,
I know this is going to sound as if I'm a beginner in Flash which I am not but, for some reason, my listbox component in Flash MX is not allowing me to scroll down its contents. It's loading the data from a database and doing the job just fine. Everything is loading correctly and I can see the items added, but again, it doesn't recognize the fact that it should allow me to scroll the contents and click them.
Can anyone help?
Thank you
Barzalou
Listbox Component
i would like to add a listbox full of links to something i am working on. does anyone know where i could find some info on how to customize the listbox component?
New ListBox Component... Trying To Do My Own.
Hi there…
I need to create my own list box (no components). With the scroll bar, and the selected item option with the highlighted option too. Basically with all the options that the ListBox component provides.
What I am trying to do, is a light (very light) version of the existing ListBox.
Can anyone help me out?
Thanks.
Cheers.
Leo.
Listbox Component
HI there...
I know that this must be basic --- When I use the List component
and added some labeles eg: Start movie 1, Start movie 2, Start Movie 3,,,,
How do I them apply the _root.pictures1. gogotoAndPlay("go");
_root.pictures2. gogotoAndPlay("go");
_root.pictures3. gogotoAndPlay("go");
Its quite simple but can someone help, didnt have luck finding
some tutors
Have a nice day:-)
Flemmming
[MX] ListBox Component
Hello,
I'm using this code to put an array into a listbox component in Flash MX
Code:
stop;
campbellAry = new Array("charlie","chris","kate","kara","jack","kathy","kim","fiona","liam",
"cesar","kaylee","john","ken","sarah","reykah");
campbellAry.sort();
for (i=0; i<campbellAry.length; i++) {
testListBox.addItem(campbellAry[i] /* + " campbell" */ );
}
I'm wondering how to give each item in the list a function? For example I'd like charlie to do something associated with the name of that item (ie loadMovie charlie.swf). How do I dynamically control each item's onRelease method's ?
Also, can I give the text a different look in the listBox somehow?
Thanks
ListBox Component
I have this component in a frame, but i cannot make reference to the index of it.
I have something like this
var selIndex = ListBoxName.getSelectedIndex ();
if (selIndex == 1) //element Index number 1
{
movieClipName.gotoAndStop (selIndex + 1);
}
it should go in the movi clip to the frame number (selIndex + 1) isn't?
or where I wrong?
---LastCyborg---
ListBox Component
I am having trouble getting a style to work on a list box. I am wanting to change the color of the scrollbar and listbox.setStyle("scrollTrackColor", "0x0fff0f"); does not work. I need help.
XML And The ListBox Component
Got this to work but there is a slight problem and I try not to post stupid questions but I can't figure this one out. I am by no mean an AS expert so it is probably something easy.
I am loading data from an xml file into a listbox and I can get the data in but it just keep looping through the data. Won't stop when it equals the total amount of nodes available in the xml doc. So that being said here is the code and maybe someone else knows wehre I went wrong.
ActionScript Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
house = [];
houseLoc = [];
pictures = [];
features = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
house[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
houseLoc[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
pictures[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
features[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
}
firstProperty();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("_pages/_xmlFiles/housesLots.xml");
this.onEnterFrame = function () {
for(i=0; i<total; i++) {
while i<total
myListBox.addItem(house[i]);
};
};
Thanks in advance for any help you can provide me.
LD
Combo Component Does Not Show Selected Value
I'm using combo box components in movie clips that i dynamically attach to a clip on the main stage. In the first clip attached, the combos work just fine -- they display the selected item in the box after the list collapses. However, when i attach another clip in place of the first, and even when i return the first clip, the combos no longer display the selected item, just a blank box. In every other respect, the combos seem to work fine.
I've seen several complaints about combos in loaded SWFs, but i'm working with only one SWF here -- and my component is exported in the first frame.
Anyone seen something like this before or have any ideas?
Thanks.
|