How do I import a image file
Posted: Thu May 16, 2013 2:39 pm
Hi,
I have some livecode experts could help me with the following problem.
I am trying to import images using the following script, the result display garbage.
I believed the problem lies in the field "text". How can I overcome this problem.
on mouseUp
answer file "Select a file" with filter "Web Graphics,*.jpg;*.gif;*.png"
if it <> "" then
put it into theFilePath
--don't forgett the brackets!
put URL ("file:" & theFilePath) into field "text"
else
--no file was selected, or cancel was pressed
beep
end if
end mouseUp
Thanks for your help.
I have some livecode experts could help me with the following problem.
I am trying to import images using the following script, the result display garbage.
I believed the problem lies in the field "text". How can I overcome this problem.
on mouseUp
answer file "Select a file" with filter "Web Graphics,*.jpg;*.gif;*.png"
if it <> "" then
put it into theFilePath
--don't forgett the brackets!
put URL ("file:" & theFilePath) into field "text"
else
--no file was selected, or cancel was pressed
beep
end if
end mouseUp
Thanks for your help.