1 Attachment(s)
MC duplicates but only 1 time
I need a continuous loop for this image viewer.
I'm using Flash MX
I have a MC that you scroll using buttons. It scrolls left, right and when the end of the MC enters the frame it duplicates so it appears to continue scrolling. The problem is it only duplicate one time the it will disappear out of frame if you continue to scroll.
I want it to keep duplicating and scrolling.
This is the actions I have for my buttons:
// left
on (rollOver) {
_root.pic2.left = true;
}
on (rollOut) {
_root.pic2.left = false;
}
// right
on (rollOver) {
_root.pic2.right = true;
}
on (rollOut) {
_root.pic2.right = false;
}
And this is the actions for my MC:
onClipEvent (load) {
mode = true;
speed = 10;
//
function go(degree) {
_y -= speed;
_x += speed;
}
}
onClipEvent (enterFrame) {
//
if (mode) {
if (up) {
_y -= speed;
}
if (down) {
_y += speed;
}
if (right) {
_x += speed;
}
if (left) {
_x -= speed;
}
}
//
// Duplicate MC
}
onClipEvent (load) {
pic1.duplicateMovieClip("pic2", 100);
pic2._x = pic1._x+pic1._width;
pic1Startx = this._x;
pic1Speed = 10;
}
onClipEvent (load) {
pic1.duplicateMovieClip("pic2", 50);
pic2._x = pic1._x-pic1._width;
pic1Startx = this._x;
pic1Speed = 10;
}
This has been put together from deconstruted FLA. files and help from the great people on this site. So sayin add this or try if, else dose'nt help, I might need more explanation than most or show me where to add it in the code.
I am attaching a sample to better explain what I am trying to do.
Thanks for all the help so far,
Maybe something like this...?