Hi!...
I have a menu as slider with following code:
quote:
stop();
WidthMovie= 800;
HighMovie = 560;
acceleration = 10;
iniciado = true;
guide_mc._width = 747.4;
guide_mc._height = 68.9;
guide_mc._x = 11.6;
guide_mc._y = 434.4;
acceleration/= 50;
panoramic_mc._x = 45.0;
panoramic_mc._y = 438.1;
half = WidthMovie/2;
Width = panoramic_mc._width;
// Code for mouse
guide_mc.onRollOver = function() {
iniciado = false;
mover();
};
guide_mc.onRollOut = function() {
//delete panoramic_mc.onEnterFrame;
};
// moving funcion
function moving() {
barremoving();
panoramic_mc.onEnterFrame = function() {
if (_xmouse != half) {
if (_xmouse<half && _ymouse<560) {
if (panoramic_mc._x<0) {
inc = Math.abs(_xmouse-half)*(acceleration/10);
//
panoramic_mc._x += inc;
}
} else {
inc = Math.abs(_xmouse-half)*(acceleration/10);
if (panoramic_mc._x>(-580) && _ymouse<560) {
panoramic_mc._x -= inc;
}
}
}
};
}
init();
function init() {
barremoving();
this.onEnterFrame = function() {
if (iniciado) {
if (panoramic_mc._x>(-580)) {
panoramic_mc._x -= 0.5;
}
} else {
delete this.onEnterFrame;
}
};
}
This code function perfect. Nevertheless, I have a several
frames in animation. Normally the slider start in first MC (from
right to left). If from first frame I go to third frame (for
exemple), the slider start again in first MC.
How is possible to get always the same movement, indiferent
to position in frame?