How do I create an unreferenced image?
pixelbird at interisland.net
Mon Dec 1 14:22:24 EST 2003
> Date: Sun, 30 Nov 2003 20:39:55 +0000
> From: Graham Samuel <livfoss at blueyonder.co.uk>
> 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
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):
import paint from file "/Macintosh HD/Desktop
...You can retrieve the absolute filepath like this:
...open the multi-line message box and type:
answer file "Choose a file:"
...You can check the folder in the msg box:
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.
More information about the Use-livecode