Displaying an image on multiple cards

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Displaying an image on multiple cards

Post by trags3 » Wed Oct 12, 2016 1:42 am

Hi All,
I'm writing an app that on the first time it is run the app goes to my server and I put a jpg image of a business card in a image field.
(The image is selected by an activation code input on first use of the app)
I would like to save that image and then display it on multiple cards rather than download it from the server multiple times.
I'm using the "put URL (the address of the image on the server) into image"bCard" of cd"mainMenu" syntax which works fine but.....
What is the code to save it and then display it on multiple cards?

Thanks,

Tom

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

Re: Displaying an image on multiple cards

Post by jmburnod » Wed Oct 12, 2016 8:30 am

Hi Tom,
I would like to save that image and then display it on multiple cards rather than download it from the server multiple times.
You can download the image file from your server to a file and set the filename of your image control on preopencard or using a shared group.
Best regards
Jean-Marc
https://alternatic.ch

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10322
Joined: Wed May 06, 2009 2:28 pm

Re: Displaying an image on multiple cards

Post by dunbarx » Wed Oct 12, 2016 2:55 pm

Hi.

Check out the "place" command in the dictionary. Use this, perhaps as Jean-Marc mentioned, to put that image on whatever cards you need to.

Craig Newman

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

Re: Displaying an image on multiple cards

Post by Klaus » Wed Oct 12, 2016 3:14 pm

Hi Tom,

I usually use BUTTONS, with their ICONs set to the ID of the single image, to display an image on more than one card
AND in different locations on the same card (if neccessary), someting that cannot be done with GROUPS!


Best

Klaus

trags3
Posts: 432
Joined: Wed Apr 09, 2014 1:58 am

Re: Displaying an image on multiple cards

Post by trags3 » Fri Oct 14, 2016 5:42 am

Hi Jean-Marc, Craig and Klaus.
Thanks so much for the help. I ended up using the groups and the Place command. I might switch to the buttons as there is one card that I kinda wanted to have the image in a different position on the card!


Thanks again!
Tom

Post Reply