If I use the menu File -> Image as Control -> Image File, .svg file are imported without any problem. But I'm unable to import the same .svg file with the import command

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
on mouseUp
answer file "Select image:"
if the result is not cancel then
set the lockscreen to true
import paint from file it
set the name of the last control to "XYZ"
wait 5 ticks
set the lockscreen to false
end if
end mouseUp
Code: Select all
on mouseup
answer file "select an SVG image"
put it into XYZ
create image
put it into ABC
set the text of ABC to drawingSvgCompileFile(XYZ)
end mouseup
And of course, i'd have to remember to include XML for the standaloneNote: The drawing binary format is not currently considered stable and is subject to change until the end of the RC cycle for 9. At present it is advised that SVG files be compiled as needed when developing in the IDE, and then compiled ahead-of-time when building a standalone.
?:I made a loop based on your script to import all .svg files in a folder an dit works great
I searched "image"
I, first of all, looked at the image stuff, and then realised that an SVG file does not contain 'paint'.I searched "image"