# Assigning picture and variable to an item of an array

**URL:** <https://forum.kirupa.com/t/assigning-picture-and-variable-to-an-item-of-an-array/223568>\
**Category:** flash\
**Created:** [April 23, 2007, 11:52pm UTC](https://forum.kirupa.com/t/assigning-picture-and-variable-to-an-item-of-an-array/223568 "2007-04-23T23:52:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![badmonur](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@badmonur](https://forum.kirupa.com/u/badmonur)\
**Post date:** [April 23, 2007, 11:52pm UTC](https://forum.kirupa.com/t/assigning-picture-and-variable-to-an-item-of-an-array/223568/1 "2007-04-23T23:52:23Z")

</div>

Three part question for all you geniouses out there.

Say I have an array and some pictures in my libriary.  
[?] \<–picture of banana

food=[banana, cookies, tofu];

and I make some general variables  
weight=0  
size=0  
Carbs=0

for example, just to give an example.

How do I create a variable to go along with that.

[?] bananna weight= 0.09lbs  
then attach a picture to go with that. Thus making my banana 0.09lbs or whatever and having a little picture. Thats just what i was pondering on and wondered if it was possible in flash.

Part three of my question:

Say I add an item to my array  
Like this:  
food\*=“orange”;

How would I search for where that is indexed in the array to make changes or to change the variables assigned to it.
