Viewpoint Forums
Viewpoint Forums
JavaScript FAQ's
How can I call an MTSInteractor or MTSAction from JavaScript?
Read-Only Topic|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
| <Viewpoint>
|
I have MTSInteractor's and MTSAction's in my MTX, how can I call them from JavaScript?
|
||
|
| <Viewpoint>
|
As the MTSInteractor is an external-event driven state-machine there really isn't any sense in calling it.
As for calling an MTSAction, this may be possible in the future, but at this time, there is no direct way of calling an MTSAction from JavaScript. There are two indirect ways of calling an MTSAction though. 1. Post a user-defined event from the JavaScript using the vmp.PostEvent function. This event must be handled inside the MTX by an interactor which will call the MTSAction. 2. Trigger an animator from the JavaScript. The animator will have within it, an ActionAnimator which has the ability to call an MTSAction. You can find an example of number 1 here: http://cole.viewpoint.com/~ddavies/postevent/index.html and you can find an example of number 2 here: http://cole.viewpoint.com/~ddavies/action2/index.html You can download the files by replacing the index.html with index.zip |
||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
Read-Only Topic
Viewpoint Forums
Viewpoint Forums
JavaScript FAQ's
How can I call an MTSInteractor or MTSAction from JavaScript?
