The simplest approach is to use a list.  It's not clear from your 
posting how you are creating these image objects, but you should do 
something like this:

global biome

   -- initialize to an empty list
   biome = []

   -- now add your first image object
   newImage = member("arctic").image
   append(biome, newImage)

   -- however you create your other image objects
   newImage = ??????
   append(biome, newImage)

Until you have 9 image objects in a single global list.

Then, whenever you want to refer to an image object, you get that one 
by indexing into the list:

     biome[i]

For example:

global biome
on updateGlobe whichbiome
   thisBiome = biome[whichbiome]
   gGlobeCopy.copypixel(thisBiome, gGlobeCopy.rect, thisBiome.rect) 
-- whatever this does??
end

Irv

At 1:45 PM -0400 7/25/02, Ya-Chun Lin wrote:
>Hi!,
>This is my second try to post the message on the list... Hope this time, it
>works....
>
>Can anyone help me to clearify this confusing concept with objects in Lingo?
>What I am trying to do is adding each colored biome onto a black-white
>globe map according to the user's input. So I create 9 objects called biome1
>~ biome9 from images(ex: biome1 = member("arctic").image) Then I created a
>behavior called updateGlobe(whichbiome). whichbiome's value is integer(1 -
>9). Now here is the question, how can I refer to the image object I created
>earlier from this integer?
>I tried: (of course, this doesn't work.... :(  )
>
>on updateGlobe whichbiome
>     biome= "biome" & whichbiome
>     gGlobeCopy.copypixel(biome, gGlobeCopy.rect, biome.rect)
>end

-- 

Lingo / Director / Shockwave development for all occasions. 
          
   (Home-made Lingo cooked up fresh every day just for you.)
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to