locate image and text in field

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

locate image and text in field

Post by Jellobus » Thu Feb 20, 2014 2:40 pm

Hi, :D

Is there way to locate image file after text in the field, then put text after image?

- There are 2 text paragraphs in a field and 1 image object.
- length of text will be changed. it depends on the data, so it could be long or short.
- image will be placed after the first paragraph so topleft or loc of image will be always changed depends on the length of the first paragraph.
- another text will be put after the image.
- Its like Text---space---Image---space---Text in fld.

I was brainstorming for few days but couldn't have idea.. Any good ideas?
Thanks for your time!

Cheers,

Louis

ps: Can I make a field automatically expand its size to show whole content of itself? then I can create two fields for text and put image between them..
Last edited by Jellobus on Thu Feb 20, 2014 2:58 pm, edited 1 time in total.

Klaus
Posts: 13858
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: locate image and text in field

Post by Klaus » Thu Feb 20, 2014 2:56 pm

Hi Louis,

not sure what you want? 8)

1. Do you want to place an image object over a field and make it looks like the image is part of the text (field)?
2. Or do you really want to put an image INTO a field and let it "flow" with the text?

If:
1. then you can get and use the exact location of the "chunk" like:
...
put the formattedright of word 1 of fld "the text field here..."into tRight
set the left of img "the imge in text" to tRight
### etc...
### Look up FORMATTEDxyz in the dictionary
...

If:
2. Then you can use "imagesource" to "replace" any cahracter in y field with an image
...
set the imagesource of char 17 of fld "a text field" to XXXX
## where XXXX is the id of any image in your stack(s)
...

Hope that helps!


Best

Klaus

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

Re: locate image and text in field

Post by Jellobus » Thu Feb 20, 2014 3:03 pm

Hi Klaus,
Wow! sloved!
I was talking about the first option. but another way is also seems good option for me :lol:

Thank you so much!

Louis

Post Reply

Return to “Multimedia”