Under rating threshold (hideshow)
Thank you Kongregate! I have been wrestling with flash game and actionscript tutorials for a couple days now. You guys make it clear and understandable without excluding the basic (but critical) steps. Thanks again.
Under rating threshold (hideshow)
The class or interface 'Background' could not be loaded.
I got this when trying to load the ship too, but I have no idea how I fixed it.
Help?
Under rating threshold (hideshow)
this solves the code error problem...you just delete that "class [da object] extends MovieClip" ad add this "onClipEvent (load) "
:D thankyou
P.S: it works with all of them for example this "background" thingy. Change
"class Background extends MovieClip" to "onClipEvent (load) " well you don't need to include the name because you already have selected the object you want to work on. if you really not sure then under the script pane you'll notice a tab with the name of the object such as "background"
Under rating threshold (hideshow)
On step seven if you have troubles with your background not being seemless change it too:
function onEnterFrame()
{
_x -= 1;
if( _x < -2110 )
{
_x += 4220;
}
}
Under rating threshold (hideshow)
on step 8 where it says to make the x value 2110 thats wrong make it 1055 but this only applies if your using the premade background
Under rating threshold (hideshow)
to The_Ripper, just highlight the shape and over on the left (or right, wherever your menu is) is will have W for width and H for height.!!!
Under rating threshold (hideshow)
Wait, whoah. This is confusing me. Im used to Java. Does "function" mean that you're making a new method for the "ship" class? Or is it not the same thing?
Under rating threshold (hideshow)
Does anybody know the background scrolling code to make the background move down, then loop? Say the background size is.. H: 650, W: 400?
Under rating threshold (hideshow)
A word of advice: Don't just copy and paste the code. Type it in yourself, you'll remember it and learn it better if you actually type it in. Kind of like repeating a word in a foreign language rather than just hearing the word.
Under rating threshold (hideshow)
Anybody who is having background issues, read this. You need to copy the background GRAPHIC, not MOVIE CLIP, inside the background MOVIE CLIP, not the GRAPIC. So just double click on the MOVIE CLIP, and copy the same GRAPHIC and paste it next to the other one. I hope thats understandable =]
Under rating threshold (hideshow)
ok for those who ahd same problem than me. u did all the code well(BG drew by urself) and did the 2 images thing) but after the 2 images ur getting a blank space be4 reloading
ok 1st be sure ur picture is 2110 by 350 that was my size(i think u can adapt the solution for other sizes but i tell u how I did) and make a space of an uni4 color at the end and begining then put the _x -= -1500 and ur image will repeat be4 having to see that blank^^
this makes ur BG have a boring end so if sum1 finds a better solution plz post it
Under rating threshold (hideshow)
I am making my background go downwards... however I can get it to go downwards, it just won't loop... it is 600 px tall... is this cade correct?? class Background extends MovieClip
{
function onEnterFrame()
{
_y += 20;
if(_y < -600)
{
_y = 0;
}
}
}
Under rating threshold (hideshow)
make sure the class name and the class name that you enter in the code are exactly the same caps or lower case and everything i was having the same problem but figured out that this was the problem
Under rating threshold (hideshow)
I got this and I cant fix it "The class 'Background' needs to be defined in a file whose relative path is 'Background.as'."
Under rating threshold (hideshow)
This dont works ITS DONT HEEELP its only says, do this and this etc... but im in page 5 and I put the rigth code and everythign and its says : The class or interface 'Background' could not be loaded.
THIS SHIT SUCK
Under rating threshold (hideshow)
Ok, guys, I got the solution after many attempts to make seeminglessly infinite looping background. In the background.as, change the 2110 to the width of the background. Tada!
Under rating threshold (hideshow)
i got this problem with the ship as well and im not sure how i fixed it it just worked eventually. my problem is i keep getting an error message saying "the class 'background' needs to be defined in a file whose relative path is 'background.as'." anyone know how to fix this?
Under rating threshold (hideshow)
I got it working, not sure why it wasn't before... I deleted all my background PNG and Movie Clips and started fresh and now it works.
Under rating threshold (hideshow)
I've finished all the posted Tutorials so far, so yes I went ahead. I put two images side by side as they said to, and set the scroll size equal to the first image. It works, for about a minute then it seems to stop all together, no looping, no background at all.
Under rating threshold (hideshow)
You two guys did look ahead in the tutorial right? It's supposed to do that, and they change it in the next step.
If not.. I dunno maybe you didn't save. But don't give up, I missed a few things up till here too (had to rename my ship image to something besides ship e.g. took me a while to figure it out).
Under rating threshold (hideshow)
Yea i'm having trouble looping as well, I gave up on my own creations and just went to the default images/backgrounds and still i cant get it to loop. Guess i'm not cut out to do this stuff if i cant even cut and paste *shrug*
Under rating threshold (hideshow)
Love these things, but one question. My background is NOT looping seamlessly infinitely.. it's doing well for a little bit, then all of a sudden it just scrolls the background off the screen. Any Ideas?