image library

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
fredigertsch
Posts: 38
Joined: Mon Jan 03, 2011 5:42 pm

image library

Post by fredigertsch » Wed Jan 26, 2011 11:55 am

Hi there
How can I include pictures in the application? In my program I set the filename of the images, but when I save the standalone application it needs the imagefiles outside. Thanks for any help.

Best, Fredi

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: image library

Post by jmburnod » Wed Jan 26, 2011 12:26 pm

Hi Fredi,

Look at the "import as control" of the file menu to import the pictures
If you want have the picture outside you must build the path of the folder it contains the pictures
Be careful, the path is different for a stack or for a standalone (the standalone is a package)

I hope this help

Best

Jean-Marc
https://alternatic.ch

fredigertsch
Posts: 38
Joined: Mon Jan 03, 2011 5:42 pm

Re: image library

Post by fredigertsch » Wed Jan 26, 2011 12:53 pm

Hi Jean-Marc

Thanks. And how can I put the same image in a other image-object. Bevor I have done this with:

set the filename of image "bild1" to the filename of image "leer" on card "resources"

Fredi

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: image library

Post by jmburnod » Wed Jan 26, 2011 1:02 pm

Hi Fredi,

Code: Select all

set the filename of image "bild1" to the filename of image "leer" on card "resources"
Yes for a picture with a filename
If the picture is imported you can use

Code: Select all

set the text of image "bild1" to the text of image "leer" on card "resources"
You can check the "import" entry of the dictionnary for infos about diffrents types of images

All the best

Jean-Marc
https://alternatic.ch

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: image library

Post by Klaus » Wed Jan 26, 2011 1:41 pm

Hi all,

instead of copying an image from one card to another, I always use buttons (disabled/no border/showname = false)
and set their ICON to the ID of the original images!

Noone will tell the difference and this will save some resources :)


Best

Klaus

Post Reply