loading image

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
michaelpicard
Posts: 5
Joined: Fri Jul 05, 2013 5:37 am

loading image

Post by michaelpicard » Fri Jul 05, 2013 5:43 am

hi
Many may seem this is a stupid question but still I have been searching and it seems there are not any really beginner tutorials out there. I am looking for something simple but cannot figure it out. How do I have it load an image instead of text when I click a button??

michaelpicard
Posts: 5
Joined: Fri Jul 05, 2013 5:37 am

Re: loading image

Post by michaelpicard » Fri Jul 05, 2013 6:28 am

come on , you're telling me nobody knows this? or you just don't want to help?

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: loading image

Post by Dixie » Fri Jul 05, 2013 6:30 am

Have a look at the attached... it will get you started, but also read up on defaultFolder... so you can point liveCode to the directory where your images are...

(Of course people want to help... you will find lots of help on this forum... but here in England 06h30 in the morning is time for tea, cornflakes and getting to the bathroom before my daughters or else I will have to wait forever to have a tinkle.. :-) )
Attachments
showPic.zip
(129.96 KiB) Downloaded 223 times

michaelpicard
Posts: 5
Joined: Fri Jul 05, 2013 5:37 am

Re: loading image

Post by michaelpicard » Fri Jul 05, 2013 6:39 am

that doesn't answer the question
I want to have an image load on click of a button. simple not get an image after selecting

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: loading image

Post by Dixie » Fri Jul 05, 2013 6:41 am

Oh well.. pray tell me where this image is located you want to load ?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: loading image

Post by Simon » Fri Jul 05, 2013 6:46 am

Oh well.. pray tell me where this image is located you want to load ?
Ha!

michael,
Try a bit harder.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: loading image

Post by Dixie » Fri Jul 05, 2013 6:49 am

Does this help ?...
Attachments
showPic 2.zip
(130.04 KiB) Downloaded 210 times

michaelpicard
Posts: 5
Joined: Fri Jul 05, 2013 5:37 am

Re: loading image

Post by michaelpicard » Fri Jul 05, 2013 6:55 am

the same folder that the file is saved in. I have tried changing the folder name to library, images etc. I can get text to load but what is the "language" to load an image is never answered. I find website programming easier than this even though I was told this is easier.
the actual image is : My documents/live code training/images/canada1.png

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: loading image

Post by Dixie » Fri Jul 05, 2013 7:13 am

I humbly suggest that you do a little RTFM... try starting with the 'User Guide' page 322 under the heading 'What is a file path ?', it will lead you gently through how to point liveCode to the directory that has your image inside it... then

Code: Select all

 set the filename of image 1 to "the filepath where your image is located"

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

Re: loading image

Post by Klaus » Fri Jul 05, 2013 12:02 pm

Michael,

do yourself a favour and check these stacks to get the very basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html

michaelpicard
Posts: 5
Joined: Fri Jul 05, 2013 5:37 am

Re: loading image

Post by michaelpicard » Fri Jul 05, 2013 9:02 pm

hi
thanks for all the help, I went too fats in trying different things while reviewing the tutorial videos and reading the users guide.
I finally got the answer from Dixie on her second post.
what I was looking for was how to say: put, place set image. if that makes sense.
on mouseUp
set the filename of image 2 to "canada1.jpg"
end mouseUp
so the answer was "set the filename" and that is what I was looking for as I could not find that wording anywhere. I usually catch on better with programming but this left me frustrated.
I will take my time and proceed slowly from now on.
Michael

Post Reply