consegui um botao deslizante que se move junto com a animação...
o unico problema.. é q preciso q ele inicie sozinho com a animação
os comandos dele fazem q ele só acompanhem a animação depois que eu clico em cima dele
se alguem souber como fazer para ele inicar automaticamente ca animação, ficarei grato
obrigado..
aqui esta o codigo
QUOTE
createEmptyMovieClip("barra", getNextHighestDepth());
createEmptyMovieClip("arras", getNextHighestDepth());
var ScrollSize:Number = 112;
with (barra) {
lineStyle(2, 0xCC0000, 100);
lineTo(ScrollSize, 0);
}
with (arras) {
beginFill(0x666666, 100);
moveTo(-2, -5);
lineTo(2, -5);
lineTo(2, 5);
lineTo(-2, 5);
lineTo(-2, -5);
endFill();
}
var DragTotal:Number = _parent._totalframes;
arras.onPress = function() {
this.startDrag(false, 0, 0, 112, 0);
delete onEnterFrame;
onEnterFrame = EF1;
};
arras.onRelease = arras.onReleaseOutside =function () {
this.stopDrag();
_parent.play();
delete onEnterFrame;
onEnterFrame = EF2;
};
function EF1() {
_parent.gotoAndStop(Math.floor((arras._x/112)*DragTotal));
}
function EF2() {
arras._x = Math.floor((_parent._currentframe/DragTotal)*ScrollSize);
}
createEmptyMovieClip("arras", getNextHighestDepth());
var ScrollSize:Number = 112;
with (barra) {
lineStyle(2, 0xCC0000, 100);
lineTo(ScrollSize, 0);
}
with (arras) {
beginFill(0x666666, 100);
moveTo(-2, -5);
lineTo(2, -5);
lineTo(2, 5);
lineTo(-2, 5);
lineTo(-2, -5);
endFill();
}
var DragTotal:Number = _parent._totalframes;
arras.onPress = function() {
this.startDrag(false, 0, 0, 112, 0);
delete onEnterFrame;
onEnterFrame = EF1;
};
arras.onRelease = arras.onReleaseOutside =function () {
this.stopDrag();
_parent.play();
delete onEnterFrame;
onEnterFrame = EF2;
};
function EF1() {
_parent.gotoAndStop(Math.floor((arras._x/112)*DragTotal));
}
function EF2() {
arras._x = Math.floor((_parent._currentframe/DragTotal)*ScrollSize);
}

Help














