Hi all, I'm creating  a Narco CP136 Audio Panel by modifying a Narco CP125 found on the web. The graphics are done and work fine. It's pretty simple and I was doing fine until I tried to make the speaker switch work. Nothing I seem to do will make the update code work. Ident button work as expected but the speaker button will not enable and disable them. I've spent all day hacking at this and I'm stumped. I'm sure it's something obvious and simple but I can't see what the problem is. I want the speaker (ident) sounds enabled when a radio and the speaker button are pressed.
Here is the all the code.I haven't added code for the marker beacons yet.
Thanks in advance for the help.
David
	
	
	
		
				
			Here is the all the code.I haven't added code for the marker beacons yet.
Thanks in advance for the help.
David
		Code:
	
	<?xml version="1.0"?>
<Gauge Name="Narco CP136 Audio Panel" Version="1.0">
	<Image Name="CP136.bmp"/>
	<!-- COM 1 TRANSMIT/Audio SELECT -->
	<Element>
		<Image Name="Button_OUT.bmp"/>
		<Position X="123" Y="36"/>
		<Select>
			<Value>(A:COM1 TRANSMIT, bool) (L:COM1Audio,number) ||</Value>
			<Case Value="0">
				<Image Name="Button_OUT.bmp"/>
			</Case>
			<Case Value="1">
				<Image Name="Button_IN.bmp"/>
			</Case>
		</Select>
	</Element>
	<!-- COM 2 TRANSMIT/Audio SELECT -->
	<Element>
		<Image Name="Button_OUT.bmp"/>
		<Position X="173" Y="36"/>
		<Select>
			<Value>(A:COM2 TRANSMIT, bool) (L:COM2Audio,number) ||</Value>
			<Case Value="0">
				<Image Name="Button_OUT.bmp"/>
			</Case>
			<Case Value="1">
				<Image Name="Button_IN.bmp"/>
			</Case>
		</Select>
	</Element>
	<!-- BOTH (COM1 + COM2) SELECT -->
	<Element>
		<Image Name="Button_OUT.bmp"/>
		<Position X="224" Y="36"/>
		<Select>
			<Value>(L:BOTHAudio,number)</Value>
			<Case Value="0">
				<Image Name="Button_OUT.bmp"/>
			</Case>
			<Case Value="1">
				<Image Name="Button_IN.bmp"/>
			</Case>
		</Select>
	</Element>
	<!-- NAV 1 Audio SELECT -->
	<Element>
		<Image Name="Button_OUT.bmp"/>
		<Position X="292" Y="36"/>
		<Select>
			<Value>(G:Var2)</Value>
			<Case Value="0">
				<Image Name="Button_OUT.bmp"/>
			</Case>
			<Case Value="1">
				<Image Name="Button_IN.bmp"/>
			</Case>
		</Select>
	</Element>
	<!-- NAV 2 Audio SELECT -->
	<Element>
		<Image Name="Button_OUT.bmp"/>
		<Position X="341" Y="36"/>
		<Select>
			<Value>(G:Var3)</Value>
			<Case Value="0">
				<Image Name="Button_OUT.bmp"/>
			</Case>
			<Case Value="1">
				<Image Name="Button_IN.bmp"/>
			</Case>
		</Select>
	</Element>
	<!-- ADF Audio Select -->
	<Element>
		<Image Name="Button_OUT.bmp"/>
		<Position X="395" Y="36"/>
		<Select>
			<Value>(G:Var4)</Value>
			<Case Value="0">
				<Image Name="Button_OUT.bmp"/>
			</Case>
			<Case Value="1">
				<Image Name="Button_IN.bmp"/>
			</Case>
		</Select>
	</Element><!--DME Audio Select  -->
	<Element>
		<Image Name="Button_OUT.bmp"/>
		<Position X="450" Y="36"/>
		<Select>
			<Value>(G:Var5)</Value>
			<Case Value="0">
				<Image Name="Button_OUT.bmp"/>
			</Case>
			<Case Value="1">
				<Image Name="Button_IN.bmp"/>
			</Case>
		</Select>
	</Element><!-- SPEAKER Audio SELECT -->
	<Element>
		<Image Name="Button_OUT.bmp"/>
		<Position X="508" Y="36"/>
		<Select>
			<Value>(L:SPKRAudio,bool)</Value>
			<Case Value="0">
				<Image Name="Button_OUT.bmp"/>
			</Case>
			<Case Value="1">
				<Image Name="Button_IN.bmp"/>
			</Case>
		</Select>
	</Element>
	<Update>
		(L:Var2,bool) (L:Var6,bool) AND if{ } els{ (>K:RADIO_VOR1_IDENT_DISABLE)} 
		(L:Var3,bool) (L:Var6,bool) AND if{ } els{ (>K:RADIO_VOR2_IDENT_DISABLE)}
		(L:Var4,bool) (L:Var6,bool) AND if{ } els{ (>K:RADIO_ADF_IDENT_DISABLE)} 
		(L:Var5,bool) (L:Var6,bool) AND if{ } els{ (>K:RADIO_DME1_IDENT_DISABLE)} 
	</Update>
	<Mouse>
		<!--COM 1-->
		<Area Left="122" Width="36">
			<Tooltip>COM 1 Transmit/Select (%((L:Com1Audio,bool))%{if}ON%{else}OFF%{end})</Tooltip>
			<Click>(L:COM1Audio,number) ! (>L:COM1Audio,number) (>K:COM1_TRANSMIT_SELECT)
			(A:COM2 TRANSMIT, bool) if{ 0 (>L:COM2Audio,number) 0 (A:COM2 TRANSMIT, bool)}</Click>
		</Area>
		<!--COM 2-->
		<Area Left="173" Width="36">
			<Tooltip>COM 2 Transmit/Select (%((L:Com2Audio,bool))%{if}ON%{else}OFF%{end})</Tooltip>
			<Click>(L:COM2Audio,number) ! (>L:COM2Audio,number) (>K:COM2_TRANSMIT_SELECT)
			(A:COM1 TRANSMIT, bool) if{ 0 (>L:COM1Audio,number) 0 (A:COM1 TRANSMIT, bool) }</Click>
		</Area>
		<!--COM1 + COM2 -->
		<Area Left="224" Width="36">
			<Tooltip>COM1 + COM2 (BOTH) Audio Select (%((L:BOTHAudio,bool))%{if}ON%{else}OFF%{end})</Tooltip>
			<Click>(L:BOTHAudio,number) ! (>L:BOTHAudio,number)</Click>
		</Area>
		<!--NAV 1-->
		<Area Left="291" Width="36">
			<Tooltip>NAV 1 Audio Select (%((G:Var2))%{if}ON%{else}OFF%{end})</Tooltip>
			<Click>(G:Var2) ! s2 (>G:Var2) (>K:RADIO_VOR1_IDENT_TOGGLE) l2 (>L:Var2,bool)</Click>
		</Area>
		<!--NAV 2-->
		<Area Left="341" Width="36">
			<Tooltip>NAV 2 Audio Select (%((G:Var3))%{if}ON%{else}OFF%{end})</Tooltip>
			<Click>(G:Var3) ! s3 (>G:Var3) (>K:RADIO_VOR2_IDENT_TOGGLE) l3 (>L:Var3,bool)</Click>
		</Area>
		<!--ADF-->
		<Area Left="395" Width="36">
			<Tooltip>ADF Audio Select (%((G:Var4))%{if}ON%{else}OFF%{end})</Tooltip>
			<Click>(G:Var4) ! s4 (>G:Var4) (>K:RADIO_ADF_IDENT_TOGGLE) l4 (>L:Var4,bool)</Click>
		</Area>
		<!--DME-->
		<Area Left="450" Width="36">
			<Tooltip>DME Audio Select (%((G:Var5))%{if}ON%{else}OFF%{end})</Tooltip>
			<Click>(G:Var5) ! s5 (>G:Var5) (>K:RADIO_DME1_IDENT_TOGGLE) l5 (>L:Var5,bool)</Click>
		</Area>
		<!--SPEAKER-->
		<Area Left="508" Width="36">
			<Tooltip>Speaker Audio Select (%((L:SPKRAudio,bool))%{if}ON%{else}OFF%{end})</Tooltip>
			<Click>(L:SPKRAudio,number) ! s6 (>L:SPKRAudio,number) l6 (>L:Var6,bool)</Click>
		</Area>
	</Mouse>
</Gauge> 
	

 
  
 
		
 
 
		



