Code: Select all
FlashObject = COMate_CreateObject("ShockwaveFlash.ShockwaveFlash", GadgetID(winhd) )
Debug FlashObject
If FlashObject
FlashObject\SetEventHandler(@myEventCallback())
....
Code: Select all
Public Event FlashCall(ByVal request As String) As String
Code: Select all
Procedure.s myEventCallback(object.COMateObject, eventName.s, parameterCount)
If eventName = "OnReadyStateChange"
ElseIf eventName = "FlashCall"
Debug "FlashCall,param count:" + Str(parameterCount) + ":command:" +object\GetStringEventParam(1) + ",args :" + object\GetStringEventParam(2)
[b]ProcedureReturn "<string>ok</string>"[/b]
ElseIf eventName = "OnProgress"
ElseIf eventName = "FSCommand"
Debug "FSCommand ,param count:" + Str(parameterCount) + ",request :"+object\GetStringEventParam(1)
Else
Debug " woo,unknown event for flash ocx"
EndIf
it is a bug for COMate?
additional, Comate SetEventHandler function register all control's event to the handler, but how i register a specified event to ONE PB's procedure? like
Code: Select all
...
comateObj\SetEventHandler("event name",@eventHandler)?
Code: Select all
...
FlashObject\SetEventHandler("FlashCall",@flashCallHandler())
....
;;flashcall event handler
procedure.s flashCallHandler(....)
...
procedurereturn "return value"
endprocedure
....

Comate is a great works!!