Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
Max #1
Re: ListBox component
Hey Mike,
After you have added your listbox to the stage, click on it.
Add code bellow to the actions script window.
on (load) {
_parent.listArray = new Array()
for(i=0;i<rowCount;i++){
trace(getItemAt(i).label)
_parent.listArray[i]=getItemAt(i).label
}
}
-Max
[url]www.flashforabuck.com[/url]
Mike Horton wrote:> Hi, could anyone help me with this problem, its probably simple to most of
> you Flash gurus but im not up on components that well. I want to get the
> values from a listBox component (eg. the labels, Bill, John, Bob etc) and
> put them into an array. I only seem to be able to use getItemAt() or
> getSelectedItem() and these seem to be triggered when a user clicks the
> list?
>
> Hope you can help
>
> Thanks
>
> Mike
>
>Max Guest
-
How to add avatars to people listbox component?
Hi, I want to know how to add avatars to people list box , please give me suggestions how to do this. I need this very urgently. Thanks in... -
Need little help with listbox component (mx 2004)
anyone know how to change the size/font of the text in a listbox component in flash mx 2004? thanks in advance. //bart -
Scroll with mousewheel on a listbox component
Does anyone know how I can use the scroll wheel on my mouse to scroll down through a Flash listbox component? (on a flash page embeded in a HTML... -
Help with ListBox Component
Can anyone point me to a tutorial for using the ListBox component? I'd like to use it for loading movies, or jumping to frames. Thanks Geoff -
ListBox component in Flash and how does one use it!?
I have a large text to use. How do i use i listbox? Tomislav! -
Mike Horton #2
ListBox component
Hi, could anyone help me with this problem, its probably simple to most of
you Flash gurus but im not up on components that well. I want to get the
values from a listBox component (eg. the labels, Bill, John, Bob etc) and
put them into an array. I only seem to be able to use getItemAt() or
getSelectedItem() and these seem to be triggered when a user clicks the
list?
Hope you can help
Thanks
Mike
Mike Horton Guest
-
Jack #3
Re: ListBox component
"Mike Horton" <mhorton@teknical.com> wrote in message
news:c0ako4$7l1$1@forums.macromedia.com...using> Hi Max thanks for your help, I finally got that bit working last nightcalled> this method:
>
> Name = "bill,bob,jon,tom"
>
> var arrLabel = Name.split(",");
> for(i=0; i<arrLabel.length; i++){
> n.addItem(arrLabel[i])
> }
> b.onRelease = function(){
>
> if(t.text == arrLabel[0]){
> trace("Same")
>
> }else{
> trace("Not Same")
> }
> }
>
> What happens in this code is on the stage I have a listbox componentName = "bill,bob,jon,tom";> "n" there is also an input text field called "t" and a button called "b".
>
> Is there an easier way?
>
> Thanks
>
> Mike
>
>
arrLabel = Name.split(",");
for(var ii=0; ii<arrLabel.length; ii++){
n.addItem(arrLabel[ii])
}
b.onRelease = function(){
for(var x=0;x!=arrLabel.length;x++){
if(t.text == arrLabel[x]){
trace("Same")
}else{
trace("Not Same")
}
}
};
hth
Jack Guest
-
Jack #4
Re: ListBox component
"Mike Horton" <mhorton@teknical.com> wrote in message
news:c0an22$bbd$1@forums.macromedia.com...you're welcome Mike,> That's great thank you very much, that's a great technique ill have to
> remember that one for future use.
>
> Thanks
>
> Mike
>
i've added this to my code snippets ( W.I.P :) at
[url]http://www.jackleaman.co.uk/flash_db/flash_db.html[/url]
feel free to browse :)
regards,
Jack.
Jack Guest
-
Mike Horton #5
Re: ListBox component
Hi Max thanks for your help, I finally got that bit working last night using
this method:
Name = "bill,bob,jon,tom"
var arrLabel = Name.split(",");
for(i=0; i<arrLabel.length; i++){
n.addItem(arrLabel[i])
}
b.onRelease = function(){
if(t.text == arrLabel[0]){
trace("Same")
}else{
trace("Not Same")
}
}
What happens in this code is on the stage I have a listbox component called
"n" there is also an input text field called "t" and a button called "b".
What im stuck on now is I want to be able to check the value of the text
field against the values in the array, so if someone types in "bill" it
would say "this item exists" else it would say "this item does not exist".
the only way I could think of doing it would be thike this:
if(t.text == arrLabel[0] | t.text == arrLabel[1] | t.text ==
arrLabel[2]){ and so on.....
But the variable Name is set dynamically so I don't know how many items
there will be.
Is there an easier way?
Thanks
Mike
"Max" <admin@flashforabuck.com> wrote in message
news:c08v6c$st$1@forums.macromedia.com...of> Hey Mike,
>
> After you have added your listbox to the stage, click on it.
> Add code bellow to the actions script window.
>
> on (load) {
> _parent.listArray = new Array()
> for(i=0;i<rowCount;i++){
> trace(getItemAt(i).label)
> _parent.listArray[i]=getItemAt(i).label
> }
> }
>
> -Max
> [url]www.flashforabuck.com[/url]
>
>
> Mike Horton wrote:> > Hi, could anyone help me with this problem, its probably simple to mostand> > you Flash gurus but im not up on components that well. I want to get the
> > values from a listBox component (eg. the labels, Bill, John, Bob etc)>> > put them into an array. I only seem to be able to use getItemAt() or
> > getSelectedItem() and these seem to be triggered when a user clicks the
> > list?
> >
> > Hope you can help
> >
> > Thanks
> >
> > Mike
> >
> >
Mike Horton Guest
-
Mike Horton #6
Re: ListBox component
That's great thank you very much, that's a great technique ill have to
remember that one for future use.
Thanks
Mike
"Jack" <jackleaman@hotmail.com> wrote in message
news:c0alit$91g$1@forums.macromedia.com..."b".>
> "Mike Horton" <mhorton@teknical.com> wrote in message
> news:c0ako4$7l1$1@forums.macromedia.com...> using> > Hi Max thanks for your help, I finally got that bit working last night> called> > this method:
> >
> > Name = "bill,bob,jon,tom"
> >
> > var arrLabel = Name.split(",");
> > for(i=0; i<arrLabel.length; i++){
> > n.addItem(arrLabel[i])
> > }
> > b.onRelease = function(){
> >
> > if(t.text == arrLabel[0]){
> > trace("Same")
> >
> > }else{
> > trace("Not Same")
> > }
> > }
> >
> > What happens in this code is on the stage I have a listbox component> > "n" there is also an input text field called "t" and a button called>> >
> > Is there an easier way?
> >
> > Thanks
> >
> > Mike
> >
> >
> Name = "bill,bob,jon,tom";
>
> arrLabel = Name.split(",");
> for(var ii=0; ii<arrLabel.length; ii++){
> n.addItem(arrLabel[ii])
> }
>
> b.onRelease = function(){
> for(var x=0;x!=arrLabel.length;x++){
> if(t.text == arrLabel[x]){
> trace("Same")
> }else{
> trace("Not Same")
> }
> }
> };
>
> hth
>
>
Mike Horton Guest
-
pauk #7
Listbox component
HI there..
I know that this must be basic --- When I use the List componen
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 findin
some tutors
Have a nice day:-
Flemmmin
pauk Guest



Reply With Quote

