Shootorial 2 problem

Subscribe to Shootorial 2 problem 8 posts, 3 voices

Sign in to reply


 
avatar for Willomo Willomo 13 posts
Flag Post

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

 
avatar for Varilian Varilian 84 posts
Flag Post

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.

 
avatar for Willomo Willomo 13 posts
Flag Post

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.

 
avatar for Varilian Varilian 84 posts
Flag Post

I’m sorry.

In line 6, check to make sure that your script says " if(_x < -2110)
I think you might have left out another underscore.

 
avatar for Willomo Willomo 13 posts
Flag Post

On the as file that underscore is there… I think my computer hates copying underscores to forum posts.

 
avatar for Willomo Willomo 13 posts
Flag Post

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)

 
avatar for explodingferret explodingferret 1351 posts
Flag Post

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.

 
avatar for Willomo Willomo 13 posts
Flag Post

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)

Sign in to reply


Click Here