• Please see the most recent updates in the "Where did the .com name go?" thread. Posts number 16 and 17.

    Post 16 Update

    Post 17 Warning old domain name stealing credentials

  • Special Server Maintenance

    Just when you think you have everything running some what better...

    You get a message from the Hosting company. Short story they need to move us to a new server. I have been working with them to plan a good date for all concerned. Here is what we have come up with as a schedule.

    1. November 4th 17:00 -5UTC shut off the forums and start backup proceedures. During this time there will be no access to the forums or the Resource Section.
    2. November 5th Continue with Backups and download same until complete.
    3. November 6th 7:00 turn over server to hosting company to move system to new server
    4. November 7th - 8th restore backups and upgrade forum software.

    If all goes well we should be back online on November 8th.

    To keep you updated Tom Clayton has offered to post updates on AVSIM forums.

    Thank you for your support.

Volume control help in xml ...

Jorge

Members +
Good afternoon.

Just a short post during lunch break wondering if there is anyone out there that knows how to set up some code that would allow me to change volume using the Doug Dawson "dsd_fsx_xml_sound.gau" gauge?

I posted over at FSDeveloper, so hoping someone there can shed some light. No "bites" over there yet.

I'm able to change volume, but I have to shut the sound off first before the change takes place. I haven't been able to figure out how to change the volume "on the fly" by clicking on the volume knob.

Here's the mouse code so far:

XML:
<!--  Volume Control  -->
    <Area Left="139" Top="375" Width="63" Height="62">
        <Tooltip>Volume: %((L:SW_Volume_Set, enum))%!6.2f!; %((L:SW_Volume, enum))%!6.2f!</Tooltip>
        <Cursor Type="Hand"/>
        <Click Kind="LeftSingle+RightSingle+WheelUp+WheelDown" Repeat="Yes">
            (M:Event) 'WheelDown' scmp 0 ==
            (M:Event) 'LeftSingle' scmp 0 == ||
            if{
                (L:SW_Volume_Set, enum) 3.33 - 0 max (&gt; L:SW_Volume_Set, enum)
                (L:SW_Volume, enum) -3000 &gt;
                    if{
                        (L:SW_Volume, enum) 100 - (&gt; L:SW_Volume, enum)
                        <!-- Make the knob rotate through 360 degrees -->
                        (L:SW_Volume_Knob, number) 1 - dnor (&gt;L:SW_Volume_Knob, number)
                    }
            }

            (M:Event) 'WheelUp' scmp 0 ==
            (M:Event) 'RightSingle' scmp 0 == ||
            if{
                (L:SW_Volume_Set, enum) 3.33 + 100 min (&gt; L:SW_Volume_Set, enum)
                (L:SW_Volume, enum) -1 &lt;
                    if{
                        (L:SW_Volume,enum) 100 + (&gt; L:SW_Volume,enum)
                        <!-- Make the knob rotate through 360 degrees -->
                        (L:SW_Volume_Knob, number) 1 + dnor (&gt;L:SW_Volume_Knob, number)
                    }
            }
        </Click>
    </Area>

Here's the main code placed in an element section just before the mouse stuff:

XML:
<!-- ========== Volume Controls ========== -->
<!-- Volume Control -->
    <Element>
        <Position X="139" Y="375"/>
        <Value Minimum="-3000" Maximum="-1">(L:SW_Volume, enum)</Value>
    </Element>
<!-- Set Volume Level -->
    <Element>
        <Position X="139" Y="375"/>
        <Value Minimum="0" Maximum="100">(L:SW_Volume_Set, enum)</Value>
    </Element>
<!-- Volume Knob -->
    <Element>
        <Position X="170.5" Y="406"/>
        <Image Name="radio_popup_tuning_knob_vega.bmp">
            <Axis X="31.5" Y="31"/>
        </Image>
        <Clip/>
        <Rotate>
            <Value>(L:SW_Volume_Knob, number) dgrd </Value>
            <Delay DegreesPerSecond="360"/>
        </Rotate>
    </Element>

The "main majic" is via another xml which acts like a "system" or "update" gauge. I would put the sound section I have so far, but it's fairly long -- about 400 lines so far, and not even close to getting all the stations in there yet.

I can post it here if it's okay, but I'd rather send the parts to someone to check out if possible.

Here's link to what it's looking like so far:

JRN-3 Shortwave Radio

Any ideas how to get the thing to have a "dynamic" volume control based on clicking the knob?

Thanks in advance!

Saludos,

Jorge
Miami, FL
 
Back
Top