Is this possible? Radio button properties with switching BG images based on play state

Hi there, can an advanced user take a look at this network and let me know if this is actually possible. I was thinking this would be pretty easy, but now i’m not sure it’s possible.

Here’s what i’m trying to do:

I have a UI with multiple buttons that trigger videos on a touch screen. I want the background image to change with two different png’s based on the play state so there is feedback like “now playing” while that video plays (that’s working). I’m using two moviefilein’s and a switch to a null out to the background of the button, all working. The problem is, I only want one button to be able to be pressed at a time because i’m playing audio on select and when I do this method, it disables or inhibits the radio feature of the buttons and all buttons can be pressed at the same time. Everything works fine just using standard button methods. Is there not a way to use switching images in radio mode? Is there another technique that can accomplish this using graphical assets like png’s or even movies?

Thanks for any advice.

Network and files are here:
buttonUI_ImageSwitcherRadio.tox

The radio state is working correctly in your setup. I added some Panel CHOPs to your network so you can more easily see what’s going on. The container above that holds the 3 Radio Buttons has its radio panel value properly updating.
buttonUI_ImageSwitcherRadio.2.toe (5.4 KB)

I might not understand the problem as you stated it.
Maybe a good question to clarify the situation is “What do you want to happen when a movie is playing and then you click another button?”
Select will always fire when you click the next radio button. Your button clicks fire the movie to play but the radio buttons do not know anything about the state of your movie playback as you’ve just triggered it with scripts.
If you want to wait until all other movies are not playing, your scripts that trigger the next movie to play need to check the current state of playback for the other buttons.

As a tip to make your python scripting easier, I would recommend to merge the 3 Panel Execute DAT scripts down into 1 DAT. You can set the Panel Execute DAT to monitor all 3 buttons at once, then use panelValue.owner to discover which button is executing the script and then take action on the correctly associated OPs.

As you have the 3 Info CHOPs with the last_frame channel, combine them with a Math CHOP and set the Combine CHOPs parameter to Multiply. The resulting single channel will be 1 if no videos are playing and 0 if a video is playing.
You can now use this channel and control the Enable parameter of all the Button COMPs. Turning off enable will prevent any interaction with the Panel Component.

Cheers
Markus

Thank you for the response Ben.

I dug into it more and have it working now. I thought the radio down buttons were going to be a quick and easy solution, but adding all of the other functionality made me have to consider all the various states of each component. Was a bit more work than anticipated. I didn’t figure out how to control this using panelValue.owner yet but would love any tips or direction for learning that and will improve the network with better python.

Here is the updated tox and below is what it does:
buttonUI_Radio_BG_ImageSwitcherv2.tox

This is a set of radio buttons where you can only click one button at a time. The button click triggers a movie file play with audio, a switching background animation inside the button animation using two moviefilein’s and a switch, it also turns off the other buttons functionality while the active one is playing and resets the others to off and ready states awaiting interactivity. The button click plays the corresponding movie file from the beginning and when it gets to the last frame it resets itself to the default ready state.

Cheers!

Thank you Markus that is a helpful tip. Much appreciated.