Teil von  SELFPHP
Professional CronJob-Service

Suche


iOS DevCon 2013



Software Architecture Summit 2013


:: Anbieterverzeichnis ::

Globale Branchen

Informieren Sie sich über ausgewählte Unternehmen im Anbieterverzeichnis von SELFPHP  

 

:: SELFPHP Forum ::

Fragen rund um die Themen PHP?
In über 130.000 Beiträgen finden Sie sicher die passende Antwort!  

 

:: Newsletter ::

Abonnieren Sie hier den kostenlosen SELFPHP Newsletter!

Vorname: 
Name:
E-Mail:
 
 

:: Qozido ::

Die Bilderverwaltung mit Logbuch für Taucher und Schnorchler.   

 
 
Adding Audio Resources to a Silverlight Game

SELFPHP Produktempfehlung
Microsoft Windows Server 2008
Seite Windows Server 2008
Seite
Microsoft SQL Server 2008
Seite SQL Server 2008
Seite
Microsoft Expression Web 3
Seite Microsoft Expression
Seite








What you’ll learn in this module:

Adding Audio Files to a Silverlight project
Setting values of a Collision behavior to audio


Venture into Gaming Using Expression Blend: Module 9

Adding Audio Resources to a Silverlight Game

Audio and sound effects are key elements in almost every game. Adding audio files to Expression Blend is straightforward and linking these audio files to specific events in the game is also very easy, especially when you are relying on Behaviors as we are here. For more information on Behaviors and how they work, refer to the module named “Adding and Applying Behaviors”.

Overview of Adding Audio to your Silverlight project
In this module you will import a number of sound files and link these sound files to the following game events: the ball hitting the paddle, the ball hitting a honeycomb, the ball hitting one of the walls.

Adding the Sound of the Ball Hitting the Paddle

  1. Open the BeeHive Solution file in Blend, then right-click the Beehive Silverlight project and choose Add Existing Item.




  2. Within the Beehive folder associated with this module, locate the Audio folder, then open it and select the paddle.mp3 file. Press OK to add it to your project.
  3. Locate the Paddle object in the Objects and Timeline panel and click the arrow to the left to expand it. Nested within are two behaviors as well as the path and image of the paddle. Select the Collision behavior. This is the code that that defines what happens when something hits the user’s paddle. You will now set the properties so that the paddle.mp3 file plays each time the paddle is hit.




  4. Click the Properties tab if necessary, then locate the Collision Properties section. Click the Audio Menu and scroll through the list until you find paddle.mp3. Select this option, then press F5 to test your game.
  5. When the game starts, you will hear the paddle sound play every time the ball hits. Close your browser and now you’ll add the rest of the sounds.


Seite 1 von 2 1 2



Downloads

Copyright © 2010
Microsoft Deutschland GmbH
Alle Rechte vorbehalten.

 Microsoft Deutschland GmbH
 




:: Premium-Partner ::

Webhosting/Serverlösungen

Pixel X weitere Premium-Partner
 

:: SELFPHP Sponsor ::

Sedo GmbH weitere Sponsoren
 

:: Buchempfehlung ::

Das Zend Framework

Das Zend Framework zur Buchempfehlung
 

:: Anbieterverzeichnis ::

Webhosting/Serverlösungen

Suchen Sie den für Sie passenden IT-Dienstleister für Ihr Webhosting-Paket oder Ihre Serverlösung?

Sie sind nur ein paar Klicks davon entfernt!


 

Ausgewählter Tipp im Bereich PHP-Skripte


Übermittelte Dateinamen überprüfen

Weitere interessante Beispiele aus dem SELFPHP Kochbuch finden Sie im Bereich PHP-Skripte
 

SELFPHP Code Snippet


PHP5 Klasse für Alexa Web Information Service

Weitere interessante Code Snippets finden Sie auf SELFPHP im Bereich PHP Code Snippets
 
© 2001-2013 E-Mail SELFPHP OHG, info@selfphp.deImpressumKontakt