Hello, first time post at KIRUPA.com. Hope somebody here may be able to point me in the correct direction.
I have an array question as the title explains.
Here’s what I would like to accomplish:
search my array for the element (say Names) for tom (name from comboBox component)
and place the other fields(i think there called…age, picture) into either dynamic text fields or load the images into a loader component.
MyArray.Array= new Array
myArr=[name:"tom", age:"32", picture:"tomspicture.jpg"]
myArr=[name:"steve", age:"50", picture:"stevespicture.jpg"]
myArr=[name:"tom", age:"60", picture:"tomspicture.jpg"]
myArr=[name:"mark", age:"32", picture:"markspicture.jpg"]
name_mc.onRelease = function () {
myName= comboBoxName.value; // collect the value stored in the combo box component and sets it to myName
// here's the problem
// I'd like to have other boxes one for imageLoader to load the image variable
// an ageDynamic_txt box that loads the age variable
// and an nameDynamic_txt box that loads all the names variable
}
Plus is there a way to place the text in the field myArr= [ … ,description:“I like cake”]
from a .txt file? (ie… I have a file named “desc.txt” with variables (des1)(des2) can I
pull it into the field […, description: (des(myNuM)] so that myNum loads the specific description for that person?
desDynamicText_txt.text = myDesLV.des(myNum); // this is kinda the idea.