Necesito ayuda porfavor para resolver un problema:
Tengo mi película flash en un solo timeline, es un slideshow de fotografías en una sola escena. Tengo botones de play, pausa, FFW y RRW para el timeline. Mis botones PLAY y PAUSA funcionan perfecto ya que afectan tanto a mi pelicula como al sonido, pero los botones FFW y RRW me dan problemas porque tengo 2 códigos uno para mi Timeline y otro para el sonido. Logro hacer que funcionen para uno o para el otro pero no para los dos al mismo tiempo (timeline y sonido). El sonido lo cargo en el primer cuadro del timeline:
var snd = new Sound(this);
snd.attachSound("slidesound");
this.snd.start(0, 10);
volume = 10
Después tengo el código para los controles de timeline:
//CODIGO Timeline
play_btn.onRelease=function (){
play();
}
pause_btn.onRelease=function(){
stop();
}
forward_btn.onPress=function (){
_root.createEmptyMovieClip("controller_mc",1);
controller_mc.onEnterFrame=function(){
_root.gotoAndStop(_root._currentframe+3);
}
}
forward_btn.onRelease=function (){
controller_mc.removeMovieClip();
}
rewind_btn.onPress=function (){
_root.createEmptyMovieClip("controller_mc",1);
controller_mc.onEnterFrame=function(){
_root.gotoAndStop(_root._currentframe-3);
}
}
rewind_btn.onRelease=function (){
controller_mc.removeMovieClip();
}
forward_btn.onPress=function (){
_root.createEmptyMovieClip("controller_mc",1);
controller_mc.onEnterFrame=function(){
_root.gotoAndStop(_root._currentframe+3);
if (_root._currentframe+3 > _root._totalframes){
_root.gotoAndStop(_root._totalframes);
}
}
}
rewind_btn.onPress=function (){
_root.createEmptyMovieClip("controller_mc",1);
controller_mc.onEnterFrame=function(){
_root.gotoAndStop(_root._currentframe-3);
if (_root._currentframe-3 < 1){
_root.gotoAndStop(1);
}
}
}
forward_btn.onRelease=function (){
controller_mc.removeMovieClip();
}
forward_btn.onReleaseOutside=function (){
controller_mc.removeMovieClip();
}
rewind_btn.onRelease=function (){
controller_mc.removeMovieClip();
}
rewind_btn.onReleaseOutside=function (){
controller_mc.removeMovieClip();
}
Pero cuando pongo el siguiente código para controlar el sonido, mi código de control de timeline ya no funciona.
Este es el código del sonido:
//CODIGO SONIDO
this.onEnterFrame = function () {
//Reverse
if (REV==1 && sndPosition>0) {
_root.snd.stop("slidesound");
sndPosition=sndPosition-.3;
//The .5 is the decremented amount.
_root.snd.start(sndPosition,0);
}
rewind_btn.onPress = function () {
REV=1;
sndPosition=_root.snd.position/1000;
//
}
rewind_btn.onRelease = function () {
REV=0
}
//Fast Forward
if (FF==1 && snd.position < snd.duration) {
_root.snd.stop("slidesound");
sndPosition=sndPosition+.3;
//The .5 is the incremented amount.
_root.snd.start(sndPosition,0);
}
forward_btn.onPress = function () {
FF=1;
sndPosition=_root.snd.position/1000;
}
forward_btn.onRelease = function () {
FF=0
}
//END
}
Espero haberme explicado bien, porque es la primera vez que entro a un foro.
Mil gracias a quien pueda ayudarme.
