sound pause / play [Flash 9]
| 17.02.2010, 19:21 | | Beiträge: 1152 Wohnort: Boston MA Registriert: Feb 2006
| sound pause / play also
ich lade den sound als bg sound in nen flv player
nu soll wenn ich pause drucke video und souind anhalten und auf play beides weiterlaufen
nu hab ich das problem das die mucke nicht die bisher angespeilte zeit nicht hat
und bei play() mal gar nix geht, und bei start () die sache von vorne anfaengt
wie kann ich ihm beibringen dort weiterzumachen(bgTrack) wo pause gedrueckt wurde?
ActionScript:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | _root.volume = 25
this.createEmptyMovieClip("soundcarrier",1);
_root.music_sound = new Sound("soundcarrier",1);
_root.music_sound.attachSound("bgTrack");
_root.music_sound.setVolume(_root.volume);
_root.music_sound.start(0,0);
stop();
function SoundFadeAus () {
//
function soundAus(){
if(_root.volume > 10){
trace("SOUND FADE OUT");
_root.volume--;
_root.music_sound.setVolume(_root.volume);
}
}
sound1 = setInterval(soundAus,50);
clearInterval();
//
}
//und hier die ns steuerung <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
playButton2.onRelease = function() {
//if pause = play if play = pause - toggleswitch
if (_root.pause == true) {
this.gotoAndStop("pause");
_root.pause = false;
_root.mc_container.playerButton1._x = 1000;
//ns.play();
//ns.seek(0)//cant because then on pause - play it starts at the beginn
//pause external swf
container.stop();
} else {
_root.mc_proxy.play();
this.gotoAndStop("play");
_root.pause = true;
//_root.mc_container.playerButton1._x = 1000;
//ns.pause();//actually stops it
}
if (_root.clipPlayed == true) {
//ns.pause();
ns.seek(0);
ns.play();
//_root.mc_container.playButton2.gotoAndPlay("pause");
_root.clipPlayed = false;
//_root.pause = true;
} else {
//ns.seek(duration);
ns.stop();
//_root.pause = true;
}
ns.pause();//actually stops it
};
|
no one died when clinton lied | |
| 17.02.2010, 19:43 | Re1 | Beiträge: 1152 Wohnort: Boston MA Registriert: Feb 2006
Themenautor/in
| und zwar so
ActionScript:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | var snd:Sound = new Sound();
snd.attachSound("bgTrack");
snd.start(0,0);
btnHalt.onRelease = function():Void {
snd.stop();
}
btnResume.onRelease = function():Void {
if (snd.position < snd.duration) {
snd.start(snd.position / 1000);
} else {
snd.start();
}
}
stop();
|
no one died when clinton lied | |
| | Themen Ähnliche Beiträge zum Thema | 10.01.2012 - Flashl00r 24.01.2011 - tigran82 19.01.2012 - Ania 16.09.2009 - fullsize |
|
Flashhilfe.de Flash Platform Tipps & Tutorials Flash Platform Andere Programmiersprachen Jobangebote Diskussionen
Flashhilfe News 
Regeln & Bedingungen
|