I followed the shootorial as closely as I could with one exception: I used my own background with the same dimensions. My background scrolls but doesn’t loop here is the code for the class “Background”:
class Background extends MovieClip
{
function onEnterFrame()
{
x = _x – 2;
if(x < -2110)
{
_x = 0;
}
}
}
Cheers~Willomo
|
|
|
|
|
If you copied/pasted, your exact code, in line 5 of that list, you put x=_x-2; You need to put _x=_x-2; Also, if your background isn’t looping, make sure that your end matches the start (this can simply be done by leaving empty space at the front and beginning, or by creating a matching start and end,) and also that you pasted it twice, once at the end of the scene, just like the example shows. |
|
|
What? I’m not sure I understand what you mean. But I did have the correct in line five but I must have accidentally deleted it. |
|
|
I’m sorry. In line 6, check to make sure that your script says " if(_x < -2110) |
|
|
On the as file that underscore is there… I think my computer hates copying underscores to forum posts. |
|
|
sorry for the double post but I just noticed that after the background almost reached the end of the window (about 2 centimetres from the edge ) It would put the background back at the start.(sorry If my phrasing is bad) |
|
|
Then your background is not 2110 pixels wide, and you may not have correctly followed the bit in the shootorial where it tells you to make a copy of the background movieclip and paste it in next to the other one. |
|
|
Now when both of those have gone past it jumps in 2 centimetres from the edge and does that each time a loop goes around. ( I changed The width from 2110 to 302, the correct width) |
Loading