Sound?
I've read a few ways of playing a sound on for example a button click in xaml, but when i search the noesis include files for "sound", nothing comes up so I assume they aren't supported. Is there a way of triggering sound in xaml or eloquent way of handling this with the host application? I'm going to have a LOT more event handlers if I can't do it through xaml...
Re: Sound?
Hi George,
We are currently working on implementing XAML Behaviors (https://github.com/Microsoft/XamlBehaviors/wiki). It's meant to be a way to add interactivity in a declarative way, without having to write a lot of code.
Among other things, it allows you to trigger actions based on events, and one of the action classes is PlaySoundAction (https://github.com/Microsoft/XamlBehavi ... oundAction).
We are currently working on implementing XAML Behaviors (https://github.com/Microsoft/XamlBehaviors/wiki). It's meant to be a way to add interactivity in a declarative way, without having to write a lot of code.
Among other things, it allows you to trigger actions based on events, and one of the action classes is PlaySoundAction (https://github.com/Microsoft/XamlBehavi ... oundAction).
- ai_enabled
- Posts: 231
- Joined:
- Contact:
Re: Sound?
You might be interested in how sounds are added in XAML in our game http://cryofall.com
The game ships with the completely open source code of UI and game logic. The game is currently available for free (open alpha).
It's a huge volume of educational material for any game developer, especially interesting in technologies like NoesisGUI, XAML and C#.
The class you're interested in particular is SoundUI and we're using it in XAML to assign sounds to different actions (such as click and mouse enter). In this class, you can see how we handle the events and call game API to play the sound.
Regards!
The game ships with the completely open source code of UI and game logic. The game is currently available for free (open alpha).
It's a huge volume of educational material for any game developer, especially interesting in technologies like NoesisGUI, XAML and C#.
The class you're interested in particular is SoundUI and we're using it in XAML to assign sounds to different actions (such as click and mouse enter). In this class, you can see how we handle the events and call game API to play the sound.
Regards!
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
Re: Sound?
Thanks, i'll definately take a look at this!You might be interested in how sounds are added in XAML in our game http://cryofall.com
The game ships with the completely open source code of UI and game logic. The game is currently available for free (open alpha).
It's a huge volume of educational material for any game developer, especially interesting in technologies like NoesisGUI, XAML and C#.
The class you're interested in particular is SoundUI and we're using it in XAML to assign sounds to different actions (such as click and mouse enter). In this class, you can see how we handle the events and call game API to play the sound.
Regards!
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Sound?
While behaviors API is not available there are some alternatives you can use.
In C++ you can extend TriggerAction class to create your own SoundPlayerAction that can be used as a response to an EventTrigger for example.
You can also use some attached properties to add the sound behavior as you require.
We can help if you need more detail on any solution you want to follow.
In C++ you can extend TriggerAction class to create your own SoundPlayerAction that can be used as a response to an EventTrigger for example.
You can also use some attached properties to add the sound behavior as you require.
We can help if you need more detail on any solution you want to follow.
Who is online
Users browsing this forum: Ahrefs [Bot] and 19 guests