2 Replies Latest reply on Jun 2, 2007 7:22 PM by Flying Li

    ActiveX Dropdown List. AddItem property problem.

    tware Level 1
      I'm trying to add a dropdown list into my director 9.0 project, under
      WinXP Pro, IE 7.

      I've added the Microsoft Forms 2.0 Combobox to the cast and attached
      the following behavior script to it.(Copied from here
      http://www.mediamacros.com/item/item-986147354/ ).

      -- Start

      property startText, ChoiceList, whatDo, spriteNum

      on getPropertyDescriptionList me
      return [#startText : [#format : #string, #default : "1", #comment : "Default text in drop-box."], #ChoiceList : [#format : #string, #comment : "List of choices separated by (;)", #default : "1;2;3"]]

      on beginSprite me
      the itemDelimiter = ";"
      repeat with x = 1 to ChoiceList.item.count
      AddItem(sprite spriteNum, ChoiceList.item[x])
      end repeat
      (sprite spriteNum).text = startText

      on getBehaviorDescription me
      describe = "Combo box startUp script. Requires the MS Forms Combo
      Box Active X." & return & "Drop this behavior on a Microsoft ComboBox
      ActiveX sprite. This will build and populate the dropdown list. To
      retrieve the property just get the text of sprite X property for the
      ActiveX Sprite."
      return describe

      -- End

      When the sprite initialises, I get the following error:

      Script Error: Handler Not Defined
      AddItem(sprite spriteNum, ChoiceList.item[x])

      As far as I can tell "AddItem" is a method in the Active X control,
      and the beginsprite section isn't finding it!

      Any suggestions as to how to fix the problem would be most welcome!