Under rating threshold (hideshow)
Currently struggling through Animate CC and ActionScript 3.0 :), but I'm getting it - slowly, but surely. I've used code snippets to get the arrow movements and scrolling background to work so far.
Under rating threshold (hideshow)
Here's the thing. These tutorials aren't correct. They give misleaded information about the code its self leading you to believe that certain things don't belong. I spent an entire day trying to figure out why the ship wouldn't go right when I pressed the right button but it just so happens that the code was wrong. It leaves important parts out as well such as the fact that you HAVE to save before you test or it won't work.
Though they do provide you with the basic script. You might have to do a little bit of fixing but the scripts work if you figure out the problem.
Under rating threshold (hideshow)
Im haveing some issues with this one, I keep getting error 5007: An ActionScript file must have at least one externally visible definition. on my Background.as Any help would be greatly appreciated
Under rating threshold (hideshow)
If you're having issues with the background looping (get the white space between the two), make sure you've done Step 3 on page 8.
Under rating threshold (hideshow)
If your ship flying off the screen bothers you, try this: You can put in this little line of code to your "Ship.as" file anywhere in the "onEnterFrame" function. Type: if(_x<20) { _x = 20; } ....for example, this will prevent your ship from flying off the stage on the left side. You can do other ones too (replace x with y to prevent flying off the top and bottom) play with the numbers till you get a boundary you are happy with :]
Under rating threshold (hideshow)
I used flash in the premodern times, without action script. Thanks for this tutorial and make me feel "in control" again (at least less ignorant)
Under rating threshold (hideshow)
I got it working for the most part but I got one major error......If I move my ship right the ship goes right but the camera goes left...if I go left camera goes right and ship goes left?
Under rating threshold (hideshow)
Why did the ship movieclip have to be registered with the dot in the middle but the background has the dot registered at the top left. What does that do?
Under rating threshold (hideshow)
Well I got it by setting _x = 4220; Which doesn't make sense, since that should send it 4220 pixels in front of my ship, but oh well, it's working so I'll work on figuring that out later.
Under rating threshold (hideshow)
For some reason I can not get a seamless loop. When I set
if (_x < -2110)
{
_x = 0;
}
It sill waits till it gets to the end of the backround before resetting. I even tried putting 4 backrounds next to each other, so it continues to 8440 pixles, but it still does not reset at 2110. It scrolls through the whole backround getting to the end and going blank before resetting _x = 0; no matter how I try and tweak it.
Under rating threshold (hideshow)
I cant seem to download any of the things, i click the click here line and all but nothing opens up. Where should i be clicking or what am i doing wrong ? ;s
Under rating threshold (hideshow)
I´ve learned to develop my own games with this!!! Understand all 8 levels and you will have a great knowledge about actionscript programming. This is a full example:"http://www.kongregate.com/games/currosonido/ornithophobia"
Under rating threshold (hideshow)
I have just came to love these tutorials. Almost every other tutorials assumed that everybody had studied programming before... really, really, thank you
Under rating threshold (hideshow)
Brilliant tutorial for the absolute basics. I was struggling to find a tutorial that actually explained each command instead of just telling me what to write, but this is perfect for the beginner to learn not copy :D
Under rating threshold (hideshow)
k I figured it out, the picture wasn't lined up when I converted it into a movieclip. I deleted it and converted it again and that fixed it. Still curious if you can fix it without deleting it though.....
Under rating threshold (hideshow)
Hey I have a minor problem, when I position the background so that the left edge is on the left edge of the stage, the x and y coordinates aren't 0....I can compensate for this in the code, but I find it kind of annoying, is there a way to fix this? I'm pretty sure I chose top left for the register....
Under rating threshold (hideshow)
"ugh. background class cannot be found even though it is in the same folder. any help?" Save the actionscript file as Background.as (if you registered the background with symbol and class Backgroud)
Under rating threshold (hideshow)
Here's a quick upgrade to the code that will make the background a bit more interactive. Just make sure to move the background down a few pixels first (you'll see why):
class background extends MovieClip
{
function onEnterFrame()
{
_X -= 2
if (_x < -2110){ _x = 0 }
if (Key.isDown (Key.RIGHT)){_x -= 3 }
if (Key.isDown (Key.LEFT)){_x -= 1}
if (Key.isDown (Key.UP)){_y += 1}
if (Key.isDown (Key.DOWN)){_y -= 1}
}
}
Under rating threshold (hideshow)
If you have errors always save. after saving you will see that if you made everything alright, it will work just fine :)
Under rating threshold (hideshow)
To those whose backgrounds don't scroll:
When you first set the background as a symbol, did you move the registration to the top left corner? The center is the default, and it's wrong. Redo the symbolizing but make sure that when you see the 3x3 grid of tiny squares, the top left is black. If not, click it.
When you copied the background image, did you do it right? Make SURE you followed page eight (step 1) very closely. Simply adding another instance of Background doesn't work, for some reason.
Hope this helps!
Under rating threshold (hideshow)
@Emilade , first, is the code on your "Ship Class" Coding? if not, was the "background class" coding applied to your ship?
Under rating threshold (hideshow)
Also, i am trying to make it use WASD in stead of the arrow keys, i know, that was last shootorial but i dont care. Instead of the "LEFT" keycode, i put A, but it doesn't work, says "A is not a valid keycode" and doesnt work. What ore the keycodes for letters? KEYW? KEYA? or just W? A?
Under rating threshold (hideshow)
okay, i've been doing well in all fo the other shootorials except this.
First: I have CS5.5 because CS3 is old and cant be downloaded anymore, and i think that might be a cause to my troubles
My problems are:
My background moves with my ship. I press left, it goes left too, press up, it goes up too etc.
It still scrolls but it also follows my ship.
Second, I cant get the Background to get the seamless Background, it gets the white area on the left of the screen after the picture is done. I did all the things the tutorial said, but as i said, i have CS5.5 so i think thats the problem.
Under rating threshold (hideshow)
not being able to understand the codes in this tutorial, you won't be able to troubleshoot your way out of your problem, make your own background make your own ship don't use the same width and height and you will find yourself troubleshooting and learning at the same time.
Under rating threshold (hideshow)
nah reading is the only thing you need to do, understanding the whole codes from the start from zero knowledge ain't that easy. this site just need more people that READS
Under rating threshold (hideshow)
I got all the way through frame 5 of the tutorial, and when I tested the movie as suggested my ship flew to the left instead of the background. I still have full control of the ship with the arrow keys, though. I'm sure there's something I've missed or not done right, but for the life of me I can't figure out what it is. The code that I have is exactly the same as in the tutorial. Can anybody help me?
Under rating threshold (hideshow)
class Background extends MovieClip
{
function onEnterFrame()
{
_x -= 1;
if(_x < -2110)
{
_x = 0;
}
}
}
I'm using this as code for the background but it won't loop, can anyone help me?
Under rating threshold (hideshow)
PLEASE message me if you have the answer to this. There is a random ass white line in front of my ship. How do I get rid of it?
Under rating threshold (hideshow)
Less and less people continue, it's like the shootorials are a dungeon RPG. Get past level 1 and understand it you can move on to level 2. If you don't try again.
Conquer all 8 levels and you are a potential developer :)