How do I create an unreferenced image?

Ken Norris pixelbird at
Mon Dec 1 14:22:24 EST 2003

Hello Graham,

> Date: Sun, 30 Nov 2003 20:39:55 +0000
> From: Graham Samuel <livfoss at>
> Subject: How do I create an unreferenced image?
> My question is, how does the IDE do this trick of embedding and
> getting rid of the external reference? I would like to create such
> images myself by scripting, but I don't see how. Sorry if this is
> obvious.
Yep, it's pretty simple as far as the command goes.

Look up "import" in the Transport Dictionary.

If you know about this and it doesn't work, I can almost guarantee it's a
location (file path) problem. Please look through the docs on "Files,
Folders, and Resources".

Here's a tested example on a Mac (watch linewraps):

on mouseUp
  import paint from file "/Macintosh HD/Desktop
end mouseUp

...You can retrieve the absolute filepath like this: the multi-line message box and type:

answer file "Choose a file:"
put it

...You can check the folder in the msg box:

put defaultFolder


See the docs for converting an absolute path to a relative path, etc.

If you are working in the IDE, then Rev has taken the Rev folder as the
defaultFolder, so unless  your image is in there, you'll have to either:

1) Assign an absolute file path as I did

...or to temporarily set a relative filepath:

2) Temporarily reset the defaultFoder, call your image, then set the default
folder back to what it was, unless you move your stack to the default

NOTE: Don't forget to account for the location of referenced images when you
build your standalone.

If anything isn't clear, come back and ask.

Ken N.

More information about the Use-livecode mailing list