 |
Changing variables with mouse clicks
Started by Spotted Zebra - Hashim at 06-26-2008 17:15. Topic has 2 replies.
|
|
06-26-2008, 17:15
|
Spotted Zebra - Hashim
Joined on 10-02-2007
Posts 5
|
Changing variables with mouse clicks
|
|
|
|
|
Hello we been trying to create a video gallery in ventuz, we want to assign different buttons to change the value of a single string variable when they are clicked.
|
|
|
|
|
Report
|
|
|
|
06-28-2008, 3:32
|
Etienne95
Joined on 05-01-2007
Los Angeles, California
Posts 14
|
Re: Changing variables with mouse clicks
|
|
|
|
|
Look at the "Mouse Over Event" scene in the Beginner's Tutorial. With the MouseOver Node, you can do something close to what you are talking about, except that it would change your string when the mouse is over a rectangle you could place somewhere in your scene.
You could have the video mapped onto a rectangle and automatically play it when the mouse is over it.
You can also look into using the Keyboard node to generate events when specific keys are pressed.
Whatever your event source is, you can link it to the Movie Clip node's Play method.
Etienne
|
|
|
|
|
Report
|
|
|
|
06-29-2008, 9:40
|
Ralf Stanke

Joined on 05-15-2005
Hamburg, Germany
Posts 366
|
Re: Changing variables with mouse clicks
|
|
|
|
|
Hi folks,
a simple approach is to use the Text Splitter Node. Type your strings into the "Input" property in multiple lines. Connect a Counter Node to the "Case" property, with Begin=0. Connect the End property of the Counter to the "Count" output of the Text Splitter and check the "ExclEnd". The counter can now provide values from 0 to n-1, where n is the number of strings you have in your list.
To "select" a value of the strings list by event, you'll need to nood a little trick: Place multiple "Event" nodes to your scene, one for each value. Now connect first the Reset method to the event node, then the Increase method. The order is important! The Event has an argument which is transferred to the Method. The Increase method of the counter uses this argument to receive the value how much to increase. the previously invok
|
|
|
|
|
Report
|
|
|
|
|
 |