Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XML newbie needs help

Featured Replies

Hey all,I'm having a little trouble with some XML gauges I'm trying to make and was wondering if anyone here can help me out?I'm trying to make 3 custom gauges to add to an existing panel. I'm trying to add COM1 TRANSMIT, COM2 TRANSMIT and COM RECIEVE ALL switches. The reason I'm having to do them from scratch and not hack up an existing gauge is two fold: 1. It needs to fit in with the panel (so all new bmp's) and 2. I can't find any to hack up :) Now to my problem. I can sucessfully get the switches to show up in the panel and they react correctly when I use a key assignment to switch them i.e. both the com1 and com2 switches flip to their opposite position (one goes up the other goes down) when I use a keystroke to change radios. The recieve all switch will also flip positions when I use the keystroke for that aswell. This makes me sure that I haven't messed up any variable names.The problem is that I can't click these with the mouse. I do however get the correct mouse symbol when I roll over the gauge (i.e. the pointing hand) but no reaction from the gauge to my clicking. This also includes no changing radios etc.Basically, in a nut shell, I've got a fully working switch but I can't click it.Anyone have any ideas (preferably in newbie language)?CheersDavidP.S. I edit them manually through notepad, incase anyone's wondering.

>Basically, in a nut shell, I've got a fully working switch but I can't click it.Well, then I guess you don't have a fully working switch :)Anyway, the switch code so far is needed to be able to give any help (although not promised :)).Uhhmm, where did the FS200_2 SDK page go? Anyone?

Hey Karl,[a href=http://www.microsoft.com/games/flightsimulator/fs2002_downloads_sdk.asp]HERE[/a] is the link to the FS02 SDK's.I'll post the code in a seperate post.CheersDavid

Don't worry about the image bmp's all being the same, I just used some previously made bmp's as a test. Also as you can see they are very simple gauges all in the same format that I've used sucessfully before.(A:COM RECIEVE ALL,bool)(A:COM1 TRANSMIT,bool)Com 1 Switch(A:COM2 TRANSMIT,bool)Com 2 SwitchCheersDavid

Well, I haven't used Click Event= style in ages, so I don't remember the correct syntax anymore. I usually do the code way, since I'm usually doing other stuff in there as well (click sounds etc).I'm only suggesting/correcting one of the errors, you'll have to figure out the rest of them yourself, since they are similar. Try this code for the click spot: 0 (>K:COM2_TRANSMIT_SELECT)It should (not possible to test at this stage) work fine in FS2004, but in FS2002 this events belong to those missing and not working ones.Hope this helps.

Hey Karl,Sorry, it didn't work. I tried some variations of it but nothing happened it was just the same as it was. Here is the new code for COM2 (just to make sure I put it in correctly):(A:COM2 TRANSMIT,bool)Com 2 Switch0 (>;K:COM2_TRANSMIT_SELECT)Can you think of anything else that might be wrong? I'm a total newbie at this so I'm not too good at it. I've only ever made two other switches in XML that were for the LAGO F16 (a GPS click spot and a custom MFD on/off switch)CheersDavid

Hi,This code works for me in 2004(!).......(A:COM2 TRANSMIT,bool).......Comm 2(>K:COM2_TRANSMIT_SELECT)Hope it helps,Jan"Procul Negotiis"

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Thank you very much Jan,I found the problem in the code, by checking it against yours, for the COM1 and COM2 switches, I added an extra ';' by mistake. They now work perfectly.However the RECIEVE ALL button still does not work.Any ideas for this one? This is the code I've got now:(A:COM RECIEVE ALL,bool)0 (>K:COM_RECIEVE_ALL)I think the action name might be wrong in this line:0 (>K:COM_RECIEVE_ALL)Any ideas?CheersDavid

David,Try:(>K:COM_RECEIVE_ALL_TOGGLE)Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

Hey Jan,Thank you very much! That line worked out great. I also noticed that I'd been spelling receive incorrectly and once I'd corrected it in the code the whole gauge didn't work.I checked the panel SDK to double check the spelling and it was indeed wrong. For the switch to react to key commands the line:(A:COM RECIEVE ALL,bool)...must have receive spelt incorrectly (the same as listed in the SDK).But for the mouse click to activate the switch the line you posted must have receive spelt correctly.How very strange!!Again thank you very much for the help, also my thanks to Karl for the help.CheersDavid

Hey all,I have one more question. How do you add a sound to the gauge? CheersDavid

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.