Handle the DefineButton2 tag.

def _handle_tag_definebutton2(self):
        """Handle the DefineButton2 tag."""
        obj = _make_object("DefineButton2")
        obj.ButtonId = unpack_ui16(self._src)

        bc = BitConsumer(self._src)
        bc.ReservedFlags = bc.u_get(7)
        bc.TrackAsMenu = bc.u_get(1)

        obj.ActionOffset = unpack_ui16(self._src)

        # characters
        obj.Characters = characters = []
        while True:
            end_flag = unpack_ui8(self._src)
            if end_flag == 0:
                # all done
                obj.CharacterEndFlag = 0
                break

            # we have a BUTTONRECORD, let's go back the 8 bits and set the obj
            self._src.seek(-1, io.SEEK_CUR)
            character = _make_object("ButtonRecord")
            characters.append(character)

            bc = BitConsumer(self._src)
            character.ButtonReserved = bc.u_get(2)
            character.ButtonHasBlendMode = bc.u_get(1)
            character.ButtonHasFilterList = bc.u_get(1)
            character.ButtonStateHitTest = bc.u_get(1)
            character.ButtonStateDown = bc.u_get(1)
            character.ButtonStateOver = bc.u_get(1)
            character.ButtonStateUp = bc.u_get(1)

            character.CharacterId = unpack_ui16(self._src)
            character.PlaceDepth = unpack_ui16(self._src)
            character.PlaceMatrix = self._get_struct_matrix()
            character.ColorTransform = self._get_struct_cxformwithalpha()
            if character.ButtonHasFilterList:
                character.FilterList = self._get_struct_filterlist()
            if character.ButtonHasBlendMode:
                character.BlendMode = unpack_ui8(self._src)

        obj.Actions = actions = []
        still_have_actions = True
        while still_have_actions:
            end_flag = unpack_ui16(self._src)
            if end_flag == 0:
                # this is the last action, parse it and then exit
                still_have_actions = False

            bca = _make_object("ButtonCondAction")
            actions.append(bca)
            bca.CondActionSize = end_flag

            bc = BitConsumer(self._src)
            bca.CondIdleToOverDown = bc.u_get(1)
            bca.CondOutDownToIdle = bc.u_get(1)
            bca.CondOutDownToOverDown = bc.u_get(1)
            bca.CondOverDownToOutDown = bc.u_get(1)
            bca.CondOverDownToOverUp = bc.u_get(1)
            bca.CondOverUpToOverDown = bc.u_get(1)
            bca.CondOverUpToIdle = bc.u_get(1)
            bca.CondIdleToOverUp = bc.u_get(1)

            bca.CondKeyPress = bc.u_get(7)
            bca.CondOverDownToIdle = bc.u_get(1)
            bca.Actions = self._generic_action_parser()

        return obj