I am trying to make a horzontial flash scrolling background and I cant seem to get it to stop at the last frame.
animator=createEmptyMovieClip('animator',1);
bg_1=animator.attachMovie('bg_mc','bg_1',1);
bg_2=animator.attachMovie('bg_mc','bg_2',1);
bg_1._x=-bg_1.width/2;
bg_1._x=-bg_2.width/2;
speed=1;
lockerWidth=550;
animator.onEnterFrame=function(){
bg_1._x-=speed;
bg_2._x-=speed;
if(bg_1._x<=-bg_1._width)bg_1._x=lockerWidth;
if(bg_2._x<=-bg_2._width)bg_2._x=lockerWidth;
}
I have a attached a ms doc showing how it looks in flash
are you trying to stop if from looping (if so, attach a screen shot that shows its timeline and the actions panel with the stop() in frame 30) or are you trying to stop it from moving?
and, fix the code you showed:
animator=createEmptyMovieClip('animator',1);
bg_2=animator.attachMovie('bg_mc','bg_2',1);
speed=1;
lockerWidth=550;
animator.onEnterFrame=function(){
bg_2._x-=speed;
if(bg_2._x<=-bg_2._width){
bg_2._x=lockerWidth;
}
}
I put a link to the original .fla file in some previous messages but it has three main images beg. middle. end and I want it to stop on the last image which is frame 30. I am very new at flash and I am not sure how to get it to stop at the last frame. So yes i want it to scroll then stop. here is a example of what i am trying to do.
http://bravoweb.lausd.k12.ca.us/grade_exp/flashsite/index.html
North America
Europe, Middle East and Africa
Asia Pacific