4 Replies Latest reply on Aug 8, 2006 4:17 PM by Newsgroup_User

    ActiveX cant access methods

    chrisosh Level 1

      I am trying to use an Activex component in Director. I am using this:
      http://www.griaule.com/page/en-us/grfinger_sdk

      In the cast, I can open the activex to see the methods and properties available. I have put on channel 1 on the stage.

      In the documentation, there is an Initialize() method, but when I call:
      sprite(1).Initialize()
      Director said scraipt error, can't find method in object

      Any ideas how to fix this?
        • 1. Re: ActiveX cant access methods
          code1234 Level 1
          Usually you need a container (global or local variable) for the object to be returned or initialized in, such as:

          global gMyControl
          set gMyControl = sprite(1).initialize()

          Providing the control has a return function, the object instance's properties and methods should be available to Lingo by calling the variable name.

          Also, although, I'm not familiar with this control, it seems a little unusual to initialize it via a sprite reference. Did you drag it from the cast onto a sprite? It seems more typical to initialize it via a call to the control's cast member name or number.
          • 2. Re: ActiveX cant access methods
            Level 7
            As someone who programs my own ActiveX controls, I disagree with most of
            this post.

            The activeX has to be in a sprite channel to be accesed. If the ActiveX has
            an initialize method, you are probably calling it right, but some ActiveX
            controls are fussy. But you wouldn't want the initialize part of the global,
            and I'm pretty sure you can't refer to an ActiveX as a castmember, although
            I'd love to hear otherwise.

            Are you sure that everything is working? Do you have another way to test the
            finger print scanner besides once you get it into director? The ActiveX
            control could be having a problem because it can't access the device. I just
            tried my ActiveX without the USB device connected and it throws up a script
            error on the initialize. Also, I've found it best to not use frame 1 of the
            score for activeX, and use the exitframe to call the initialize so it has a
            chance to start up before you call the function.

            TR


            "code1234" <webforumsuser@macromedia.com> wrote in message
            news:eavvoi$6l3$1@forums.macromedia.com...
            > Usually you need a container (global or local variable) for the object to
            > be
            > returned or initialized in, such as:
            >
            > global gMyControl
            > set gMyControl = sprite(1).initialize()
            >
            > Providing the control has a return function, the object instance's
            > properties
            > and methods should be available to Lingo by calling the variable name.
            >
            > Also, although, I'm not familiar with this control, it seems a little
            > unusual
            > to initialize it via a sprite reference. Did you drag it from the cast
            > onto a
            > sprite? It seems more typical to initialize it via a call to the
            > control's
            > cast member name or number.
            >


            • 3. Re: ActiveX cant access methods
              iso96 Level 1
              For TR:

              Hello,

              I see you know a bit about axtivex controls in director, maybe you can help me out?

              Is there anyway of being able to use the TAB function to TAB to the next ediitable sprite rather than TAB inside itself?

              (im talking about the microsoft forms 2.0 textbox & combobox in partiular)

              many thanks

              iso
              • 4. Re: ActiveX cant access methods
                Level 7
                The tab key and director work a little funny. I had a kiosk where they just
                needed a wrapper for a web browser, but director swallowed the tab key
                presses and it was annoying to use the form entry fields without the tab key
                working, so I ended up making a VB wrapper and all was well, and it worked
                faster.

                Over on the mediamacros website theirs a behavior called "Editable
                Field/Text AutoTabbing" which may help you out. If the activeX is taking
                focus and director is not catching the Tab keys, you might be able to use
                BuddyAPI and KeyBeenPressed or KeyIsDown to have director take control back
                from the ActiveX item.

                "iso96" <webforumsuser@macromedia.com> wrote in message
                news:eb2m17$9rf$1@forums.macromedia.com...
                > For TR:
                >
                > Hello,
                >
                > I see you know a bit about axtivex controls in director, maybe you can
                > help me
                > out?
                >
                > Is there anyway of being able to use the TAB function to TAB to the next
                > ediitable sprite rather than TAB inside itself?
                >
                > (im talking about the microsoft forms 2.0 textbox & combobox in partiular)
                >
                > many thanks
                >
                > iso
                >