Community Library > Open Web Page V2
Download Model (MiceOnABeam v1.0.2)
-
Configurable State
To create the component I first created an enclosing state called OpenURL by selecting state S and choosing Aggregate Component from it's right-click menu. I then renamed the state to OpenURL.
Next I created a state variable for OpenURL called "g_url", by clicking the Configure checkbox and selecting Init On Startup from the Configure Options dialog. I also set a default value for the variable.
After having saved the new configurable state variable, the OpenURL state shows the Configured icon in the bottom left. This means you can select Configure Component from it's right-click menu which will bring up a form in which you can fill in the url that you want to use. -
Using a Self Transition
I have replaced the touch transition that went from state S to S1 by a self transition on state S. In this way, the script returns to state S after executing the transition action code in the touch transition, and can then again respond to another touch.
