16 lines
331 B
Text
16 lines
331 B
Text
|
|
-- parent script "CameraPhone"
|
||
|
|
property ancestor
|
||
|
|
|
||
|
|
on new (me)
|
||
|
|
c = script("Camera").new()
|
||
|
|
mp = script("MobilePhone").new()
|
||
|
|
|
||
|
|
-- make the Camera instance a parent of the MobilePhone instance
|
||
|
|
mp.setProp(#ancestor, c)
|
||
|
|
|
||
|
|
-- make the MobilePhone instance a parent of this CameraPhone instance
|
||
|
|
me.ancestor = mp
|
||
|
|
|
||
|
|
return me
|
||
|
|
end
|