Just after importing a picture, the "linked" attribute of the
picture member is "false". When distributed, the data of picture is
packed in the DCR file.
If some lingo code changed the "filename" of the member,
member("MyPicMember").filename = ".\NewPicture.jpg"
The content of the picture would be changed. And as a
result, the "linked" attribute of the member would be changed to
"true" at the same time. A triangle appears on top right conner of
the icon of the picture member. If distributed again at this time,
the data of picture is not packed in DCR file. Picture file must
exist beside the DCR.
Now I want to restore the "linked" to "false" (because I
want to write new projects based on the old, I want to let the
picture data in the DCR again). I found it is difficult to restore
it. The "linked" attribute can not be modified, whether in Property
Inspector or in code. I found the only method is delete the member
and import again, manually, one by one. But there are many pictures
in my program, so it makes me tired.
Anyone tell me a good method to restore them? I hope it can
use code to do it.
cl = the activecastlib
sel = the selection of castlib cl
anz = sel.count
repeat with n = 1 to anz
repeat with m = sel[n] to sel[n]
memref = member(m, cl)
if memref.type = #bitmap then
fname = memref.filename
if fname.length then
select the members you want to import (or "select all" to
import all linked bitmaps) and type
into the message window and press return.