switching movies with sound and rewind by switch

Hi there

i am a begginer user for touchdesigner and working on a project with a video with sound and 2 still images. there is a switch TOP operator controlled by arduino unit via serial port

my problem is when the switch changes the output from video to static image ones the sound of video remains at background and when the switch makes we turn back to video the video continue from the loop i want it to be rewinded and start from the first frame.

the serial port inputs from arduino is used as 0-1-2 and i am trying to use them to cue point pulse parameter of moviefilein node but i can not find a way to use the dat table content at moviefilein cue pulse parameter.

Is there a easier way for using the top switch to stop and rewind the looping moviefilein node?

thanks for any kind of help
3filein.toe (9.47 KB)

You were already on the right path, adding your commands in the serial callbacks.
You can just add commands for the other nodes there also.

Attached your network, I temporary replaced the images&movies with the default TD samples so it works on any computer. I added code for stopping the audio when we are not showing the movie:

op('audiomovie1').par.play = 0

and for cueing the movie TOP from start:

op('moviefilein6').par.cuepulse.pulse()

cue_movie_from_start.toe (5.26 KB)