There is a difference between runtime errors and compiler errors: this is vital to understand so we won't get confused or frustrated when unexpected things happen. Unexpected things will happen: part of the fun comes from figuring out why!
Compiler errors are errors that Flash catches while it's trying to compile your application, preventing it from finishing compilation. On the other hand, runtime errors are warnings that Flash triggers to you after the application is compiled (and it's already running) that it didn't catch before. It is also important to know that these two panels are not visible to the end user.
Compiling errors happen when you build your application, and there are mistakes that Flash knows are mistakes. For example, you assign something the wrong value, you type something incorrectly, you missed a parameter, or you added too many things. Flash will know that you made an error or did something that you didn't mean to do: it will give you a warning.
All of the errors are related to your mistakes in syntax (typing errors, wrong arguments or the like.) They will be put into your compiling errors panel as soon as Flash tries to compile your application into an .SWF file. Any such error will prevent you from completing your compiling.
Run-time errors, on the other hand, happen after your application is compiled and running. If Flash hits an unexpected something (could be anything) as your application is running it will warn/announce it to you. For example, if it couldn't find a file that you tried to load, it triggers a runtime error letting you know about it in the output panel (well true only for us as we are working in the Flash editor.) So, on the fly, flash will output into the output panel warnings and errors that it didn't catch during compilation. Additionally, you can send messages to the output panel as you're trying to run your application. It is also important to know that the output panel and compiling error panels are not visible to the end user, but programmers will be able to see your output panel if you don't omit the capability.
The next topic we want to talk about is our runtime errors and our compiler errors, and see the differences between them. We'll just touch them briefly and then revisit them as we start coding. To do that (again, i'm currently in CS5) we'd have to create first a new ActionScript 3.0 file, which is in *.fla file format. Now that I have a file, we could actually see that I already have it preset because i'm in my Ben settings, where I put my output panel and I put my compiler errors up here. If you don't find it you could always go to your window, search for your output, you'll reach output. Or you can search in your window, go to your compiling errors, and see you're compiling errors. What is output, and what are compiling errors? We're going to see this much more in depth, but what we want to get right now is a very very quick overview of what they are. Let's start with compiling errors. Compiling errors happen when you build your applications, and you've done a few things wrong in your code, that are clear-cut for Flash- it knows you made a mistake. Which could be that you assigned the wrong value, or you've typed something incorrectly, you've missed a parameter, or you added too many things. Flash then will know that you've made a mistake, or it would notice that you're doing something that you might not mean to do, and it might want to give you a warning. Without showing a live example right now because I'm going to do that as we start touching the programming part of this course, all of the errors are related to your mistakes and to your syntax, or to things that are clear-cut errors that Flash knows you made. They're going to be outputted here as soon as Flash tries to build your application, as soon as Flash tries to convert your application into the computer language that Flash player knows how to run with. Any error that's clear cut will actually compile and come directly into your compiling errors and prevent you from completing your compiling. Now, what does the output do? Runtime errors, on the other hand, do not happen while your application is compiled, it happens after your application compiles. So, after your application compiles, if Flash finds some error, or warning, or message that it needs to tell you after the application is running-- which it couldn't tell you in advance -- such as it couldn't find a file that you tried to load, which is a great example where there's a warning that Flash gives an error that says it can't find it. Or, things that are more detailed than we could get right now, but basically mistakes that we've made that Flash couldn't realize or didn't notice until it was too late, until after we compiled. So then, on the fly, Flash will generate errors when it notices that they happen(AKA runtime Error), and they would output into our output panel and not into our compiling errors. What else could happen in the output? In the output, which we will see really shortly, we can actually send messages to the output as we're trying to run our application. Now it's important to note, obviously our compiling errors and our output are not visible to our end user although programmers would be able to see our outputs if we don't omit them, if we don't get rid of them. Our basic users that are reading it on their phone, or running it on their browser, or on an air application, they would not see those messages that are running in our output. So we now know the definition of the difference between compiling errors and output, and we're going to see that in action really soon!
Have a question but don't want to ask it publicly? If you are a prime member just ask right here and we will get back to you within 48 hours. Not prime yet? no worries you can ask publicly below.