|
|
|
Acrobat ActiveX Control
Added on 6/18/1999
|
Use this for Acrobat control in Director. Drop on the Acrobat ActiveX as well as the buttons. Make sure to start the activeX control after frame 1 (allows the beginSprite handler to run) and make sure the activeX is in a later sprite channel than the buttons.
Tested with Acrobat Reader 4. May not work with earlier versions.
--Copyright 1999 Chuck Neal
--chuck@mediamacros.com
--If you find this code helpful, send me an e-mail and let me know. :-)
property sourceFile, spriteNum, toolBar, scrollBar, buttonDo, xSprite
on getPropertyDescriptionList me
p_list = [:]
if (sprite the currentSpriteNum).member.type = #activeX then
addProp p_list, #sourceFile, [#default : "test.pdf", #comment : "Initial Pdf: the moviePath &", #format: #string]
addProp p_list, #toolBar, [#format : #boolean, #default : False, #comment : "Show Tool bar?"]
addProp p_list, #scrollBar, [#format : #boolean, #default : False, #comment : "Show Scroll bar?"]
else
addProp p_list, #buttonDo, [#format : #symbol, #default : #NextPage, #comment : "What this button does:" , #range : [#NextPage, #PreviousPage, #FirstPage, #LastPage, #Print]]
end if
return p_list
end
on beginSprite me
if (sprite spriteNum).member.type = #activeX then
(sprite spriteNum).src = the moviePath & sourceFile
setShowScrollbars(sprite spriteNum, scrollBar)
setShowToolbar(sprite spriteNum, toolBar)
sendAllSprites(#iAmX, spriteNum)
end if
end
on iAmX me, whatSprite
xSprite = whatSprite
end
on mouseUp me
if (sprite spriteNum).member.type <> #activeX then
case buttonDo of
#NextPage : goToNextPage(sprite xSprite)
#PreviousPage :goToPreviousPage(sprite xSprite)
#FirstPage : goToFirstPage(sprite xSprite)
#LastPage : goToLastPage(sprite xSprite)
#Print : print(sprite xSprite)
end case
end if
end
on getBehaviorDescription me
describe = "Drop this on your acrobat activeX component or your acrobat buttons. Make sure that all elements of the system start on the same frame and that the acrobat sprite is after the button sprites in the score. If you don"t get all the ActiveX choices then you are probably dropping it on the wrong sprite."
return describe
end
|
|