Jus to add to this thread, with my audio display. This will make the current track slide in and out on the mainmenu..
in default.xip-default.xap
search for
CODE
function MusicPlayerPlay()
make it look like this
function MusicPlayerPlay()
{
theMusicPlayer.url = "st:" + theMusicCollection.GetSoundtrackSongID( currentAlbum, currentTrack );
log("Playing " + theMusicPlayer.url);
DisableAmbientAudio();
theMusicPlayer.Play();
var str1 = theMusicCollection.GetSoundtrackSongName(currentAlbum, currentTrack);
var c = theMainMenu.children[0].children[0];
c.NowPlayingtext_text.geometry.text = str1;
c.NowPlaying_text.SetAlpha(1);
c.NowPlaying_text.Fade= 8;
c.NowPlaying_text.SetTranslation(10, -75, 80);
}
next look for
CODE
function OnStop()
make it like this
CODE
function OnStop() { MusicPlayerStopping(); theMusicPlayer.Stop(); }
next look for
CODE
behavior
if you dont have it add the whole thing under the last } of function OnActivate()
CODE
behavior
{
sleep 30;
MusicPlayerStopping();
}
next add this to the bottom of the file as the last entry
CODE
function MusicPlayerStopping()
{
var c = theMainMenu.children[0].children[0];
c.NowPlaying_text.SetAlpha(0);
c.NowPlaying_text.Fade= 1;
c.NowPlaying_text.SetTranslation(100, -75, 80);
}
save and close
open mainmenu.xip/default.xap and put this code at the very bottom
CODE
DEF NowPlaying_text Transform
{
children
[
Transform
{
rotation -1 0 0 1.571
children
[
DEF NowPlayingtext_text Shape
{
appearance Appearance
{
material
DEF NowPlayingTextMaterial MaxMaterial { name "AudioCD" }
}
geometry Text { font "Heading" translate true text "now playing" }
}
]
}
]
rotation -1.000000 0.002966 0.003888 -1.551000
scale 5 5 5 // 7.000 0.0 7.000
translation 100 -75 80 // 10 -75 80 -14.379000 -10.540000 3.903000
}
ur done, save upload reboot..