---- written for Director 8 ---
---- Kumar.K kumark@icode.com ----
--- Custom Properties ---
property TheSprite,WhereTo,MyAction,zoomLevel,MyCursor,spritenum
--- Get Behavior Description List ---
on getPropertyDescriptionList me
if not the currentspritenum<>0 then exit
DigitalvideoSpriteList=searchDigitalVideo (me)
descriptionlist = [:]
if DigitalvideoSpriteList.count > 0 then
addprop descriptionlist,#TheSprite,[#comment:"Digital Video Sprite Number :",
#format:#String,#range:DigitalvideoSpriteList,#default:DigitalvideoSpriteList[1]]
else
addprop descriptionlist,#TheSprite,[#comment:"Digital Video Sprite Number :",#format:#Integer,#range:[#min:1,max:the lastchannel],#default:1]
end if
addprop descriptionlist,#MyAction,[#comment:"Action :",#format:#String,#range:["Zoom In","Zoom Out"],#default:"Zoom In"]
addprop descriptionlist,#zoomLevel,[#comment:"Select ZoomLevel :",#format:#Integer,#range:[#Min:1,#Max:10],#default:5]
addprop descriptionlist,#MyCursor,[#comment:"Select the Cursor :",#format:#Cursor,#default:280]
return descriptionlist
end getPropertyDescriptionList
-- events --
on mousewithin
sprite(spritenum).cursor=MyCursor
end
on mousedown
if sprite(TheSprite).IsVrMovie then
if MyAction="Zoom In" then
repeat while the stilldown
the fieldOfView of sprite TheSprite = the fieldOfView of sprite TheSprite - zoomlevel
updatestage
end repeat
end if
if MyAction="Zoom Out" then
repeat while the stilldown
the fieldOfView of sprite TheSprite = the fieldOfView of sprite TheSprite + zoomlevel
updatestage
end repeat
end if
end if
end
-- events --
------ Availbale for only Sprite Script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
case aSpriteType of
#graphic:
return true
#script:
return false
end case
end isOKToAttach
------ Availbale for only Sprite Script ------
------ Search for QT/AVI Sprite ------
on searchDigitalVideo me
DigitalvideoSpriteList = []
repeat with i = 1 to the lastchannel
if member(sprite(i).member).type=#QuickTimeMedia then
if sprite(i).isvrmovie then
DigitalvideoSpriteList.append(i)
end if
end if
end repeat
return DigitalvideoSpriteList
end
---
--- Search for QT/AVI Sprite ------
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA