Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  JavaScript    Interactor/Action on/off?

Moderators: e_phoenix13
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
I would like to know if I can turn off and on the previously generated Interactors / Actions.
Let's say for example I have an Action which collapses a cube when I press LeftMouse on it. Then (let's say) I have a button and when I press it it turns off the Action (so the cube won't collapse on LeftMouse press).
Is it possible to do this? Is it possible to do this through Javascript?

thanks
 
Posts: 14 | Registered: May 15, 2006Reply With QuoteEdit or Delete MessageReport This Post
EnIgMaTiCScOrPioN
Member
Picture of e_phoenix13
Posted Hide Post
Hi Smoke !!

Yes you can switch off an interactor by making it Inactive.
Here is an example:
<MTSInteractor Name="myInteractor" Active="1" >
    <Target Name="MTSInstance.myCube" />
    <MTSHandle Event="MouseLeftClick" Action="myAction" />
</MTSInteractor>


To deactivate the interactor:
<MTSAssignProperty Target="MTSInteractor.myInteractor::actv" Value="0" />


To activate the interactor:
<MTSAssignProperty Target="MTSInteractor.myInteractor::actv" Value="1" />



Hope this helps.


Cheers,

Anup
 
Posts: 557 | Location: India | Registered: February 12, 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
Hey!
Thanks for help!
Yes this is exactly I was looking for!

Now back to scripting Big Grin
 
Posts: 14 | Registered: May 15, 2006Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  JavaScript    Interactor/Action on/off?