Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Mastermind
StopWatch Timer
Custom Projector Icon
Shockwave asking for Xtras
Setup Anim
Visted Sections
Change FillCycles Continuously
Importing Externally Linked Flash members
FADER
DM Transitions Pack 2
 

 

 

Behavior Acrobat ActiveX Control

Added on 6/18/1999

 

Compatibilities:
behavior D7 D8 Mac PC

This item has not yet been rated

Author: MediaMacros (website)

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

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail