Jump to content


Photo

add item to combobox


  • Please log in to reply
5 replies to this topic

#1 Garethfc

Garethfc

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 16 September 2005 - 12:13 PM

mi english really sucks sorry

I use a combobox in mi rpg to recolect items
i am using the macromedia combobox who comes with flash mx and i need a code for this:
when character histtest "diamond" (for example) add an item "diamonds" in combobox

the part of hittest and movement is ok, but i cant obtain a new item in mi combobox =(

if you have and idea, please help me


bye and sorry for mi english again

#2 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 17 September 2005 - 04:21 AM

this should do it

my_combobox.addItem(itemname);

#3 Garethfc

Garethfc

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 17 September 2005 - 06:24 PM

its dosent works...
remember is flash mx
i put:
onClipEvent (enterFrame) {
 if (_root.character.hitTest (this)) {
my_combobox.addItem(diamond);
}
}

i have a character named "character"
i have a combobox named "my_comboboox"

and the hittest works perfect
so if someone knows an answers, please help me =)

#4 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 18 September 2005 - 06:21 AM

I'm pretty sure that this should also work for MX

combobox.addItem("label", data);

#5 Garethfc

Garethfc

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 18 September 2005 - 11:18 AM

=/ i am doing something wrong,
incluse when i writ
combobox.addItem(
near the code it appears a tex
"("label", data)"
but it dont works =(

#6 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 18 September 2005 - 03:54 PM

it should be
combobox.addItem("label",data);
and not
combobox.addItem"("label",data)";

you can also send me the fla file for checking..

Edited by funkysoul, 18 September 2005 - 03:54 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users