| further reading | more topics » |
| mjbWorld program | 3D theory |
3D physics |
3D maths |
3D programming | technology |
about site |
sitemap A-Z |
| index | language | dev tools | games | structure | platforms | OOAD | information |
| index | setup | 2d | 3d |
| index | dx9vb | dx9C# | OpenGL C++ |
| index | introduction | installation | basics | restoring | images | animation | transpancy |
| background | sound |
|
This tutorial was written for me by Imran Khan (imranahmedkhan82@hotmail.com,
iak1982@yahoo.com). |
|||
|
Adding Sound/Video: Sound: First add a reference of AudioVideoPlayback as we added directx and directdraw in the first tutorial.
To play sound in Directx is very simple. First Declare a instance to the Audio Class.
Simply we add this line to Constructor of the form1 (public Form1(): base())
Now simply add this line where you want to play the sound. titlesound.Play( ); when you want to stop call titlesound.Stop( ); For Pause titlesound.Pause( ); If you want to open a file and play it when its declared then write: titlesound.Openl("titlesound.wav", true); If you want to open from any URL, then write: titlesound.OpenUrl("http://www.somename.com/titlesound.wav", true); If you want to jump to certain position in the sound you can use the CurrentPosition property. titlesound.CurrentPostition = 100; This is all about Sound.You can add sound simply to your Game. Video: It is same as the Audio Class . First declare a instance to video class, private Video titlevideo; Then in whereever you want to start the move declare a new instance of the Video class titlevideo = new Video("titlevideo.mgp", true); to play,stop and pause use the Same method as mentioned in the Audio class. .
|
|
metadata block
|
|
| see also: | |
| Correspondence about this page | |
|
Book Shop - Further reading. Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them. |
|
|
Commercial Software Shop Where I can, I have put links to Amazon for commercial software, not directly related to this site, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them. |
|
|
Can this page be improved? Please send me any improvements to here. I would appreciate ideas to make the pages more useful including error correction, ideas for new pages, improvements to wording. It helps if you quote the full URL of the page. |
|
|
progam I am working on a project which uses these principles, if you would like to help me with this you are welcome to join in, here: |
for kdgame programming: http://sourceforge.net/projects/kdgame/ |
This site may have errors. Don't use for critical systems.
Copyright (c) 1998-2008 Martin John Baker - All rights reserved - privacy policy.