Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  JavaScript FAQ's    How can I call an MTSInteractor or MTSAction from JavaScript?

Read-Only Read-Only Topic
Go
New
Find
Notify
Tools
-star Rating Rate It!  Login/Join 
<Viewpoint>
Posted
I have MTSInteractor's and MTSAction's in my MTX, how can I call them from JavaScript?
 
Report This Post
<Viewpoint>
Posted
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
 
Report This Post
  Powered by Eve Community  

Read-Only Read-Only Topic

Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  JavaScript FAQ's    How can I call an MTSInteractor or MTSAction from JavaScript?