On 27 Nov 2011, at 15:38, William de Smet wrote:

> Eventually I will need a lot of images and now I was thinking of
> keeping the images outside of the stack in a separate folder.
> Is it possible to do the same thing? Read the images and their ID and
> set the icon of the button to the ID of an image.

Not exactly like that, but you can create image objects that only reference an 
stored image somewhere, by setting it's fileName. So you could have a button 
that references an id of an existing image object, which in turn references an 
image on your hard disk. I suggest to look up the fileName dictionary entry, 
barring that, here's an example (untested):

on mouseUp
  create image
  put it into theImageID
  create button
  put it into theButtonID
  set the icon of button ID theButtonID to theImageID
  answer file ""
  if it <> "" then
    set the fileName of image ID theImageID to it
  end if
end mouseUP

-- 
Watch live presentations every Saturday:
http://livecode.tv

Use an alternative Dictionary viewer:
http://bjoernke.com/bvgdocu/

Chat with other RunRev developers:
http://bjoernke.com/chatrev/


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to