set filename of image to source within the stack

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
Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

set filename of image to source within the stack

Post by Jellobus » Thu Aug 28, 2014 1:51 am

Hi :mrgreen:

I have stack with external image source folders. The images in the stack were shown by using "set the filename of the target to URL". the images in the stack are changed by URL setting.

Now I like to put all images file sources into the stack then no one can see external image folders when it is saved as a standalone app. but with this modification, "set the filename of the target to URL" won't be usable any more... the images recognized by their numbers and chars of the their name such as image001_B.png, image002_B.png.. Any suggestions?

Thanks in advance!

Louis
Last edited by Jellobus on Thu Aug 28, 2014 7:20 pm, edited 1 time in total.

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

Re: set filename of image to source within the stack

Post by Klaus » Thu Aug 28, 2014 12:17 pm

Hi Louis,

how do you create the URLs for the filenames?
Can you post the script?


Best

Klaus

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

Re: set filename of image to source within the stack

Post by Klaus » Thu Aug 28, 2014 12:23 pm

Please forget my last posting! 8)

You could do something like tis:
1. Import all your images on ONE card of your stack or even on a single card of a (new) substack.
2. Then you can access these images in your script, which formerly created the url and you can simply:
...
## Images on card in same stack:
put img "whatever.png" of cd "the hidden card with all the images" into img "display" of this cd
...
## Images on card in sub stack:
put img "whatever.png" of cd "the hidden card with all the images" of stack "all images" into img "display" of this cd
...
You get the picture :D


Best

Klaus

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: set filename of image to source within the stack

Post by Jellobus » Thu Aug 28, 2014 5:18 pm

Hi Klaus, :D

I got it, It works!

thank you!

Louis

Post Reply