02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoPrevious Video

Runtime vs. Compiler Errors

<p><strong>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</strong>. Unexpected things <strong>will </strong>happen: part of the fun comes from figuring out why!</p> <p> <strong>Compiler errors</strong> are errors that Flash catches while it's trying to compile your application, preventing it from finishing compilation. On the other hand, <strong>runtime errors</strong> 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. </p> <h1>What are compiling errors?</h1> <p>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. </p> <p> All of the errors are related to your mistakes in <strong>syntax </strong>(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. </p> <h1>What is a runtime error?</h1> <p>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 <strong>output panel</strong> (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.</p> <h2>Compile Errors vs. Runtime Errors Video Transcript&nbsp;</h2> <div class="expandable"><pre> The next topic we want to talk about is our runtime errors and our <a href="http://02geek.com/courses/video/6/45/Runtime-vs-Compiler-Errors.html#compile">compiler errors</a>, 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? <a href="http://02geek.com/courses/video/6/45/Runtime-vs-Compiler-Errors.html#runtime">Runtime error</a>s, 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 <a href="http://02geek.com/courses/video/6/45/Runtime-vs-Compiler-Errors.html#runtime">runtime Error</a>), 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! </pre></div>

Developer Basics Overview

Pro or new, this course is for you. Our custom exams speed learning by filtering exams: zero to geek in no time! Always wanted to learn Flash? Take this free thorough 02geek tutorial, join the fun.

03:19

Starting Point Overview

In this overview we talk about what you get out of the next hour of this course: Know the Flash Environment, Files & Publishing, Output & Troubleshooting, OOP vs. Timeline, Sample files and resources.

03:08

File Types

Learn to code the right way, beginning with the different file types that are important to know about Flash: exactly what .as and .swf files are.

12:44

Where Is It?

The difference between CS5 and Cs3 layouts: Cs4 and Cs5 as well. . This Flash tutorial is the perfect starting point for those of you that have never used Flash before.

09:52

Workspace

Looking at our Cs5 workspace working area. Also, Cs4 and Cs3: how to use Flash As3 so we're on the same page.

06:43

Runtime vs. Compiler Errors

What is the difference between runtime and compiler errors? What are runtime errors and when do they happen? What are compile time errors?

03:39

Overall Things To Know

What are the things needed to know about Flash? Flash is a time-based programming language, which means it compiles, (unlike Javascript). Educate yourself with the basics of coding and learn how to bu

07:36

The Properties Panel

In this session we meet the properties panel and see how it's dynamic and flexible. By the end of this session you will know all you need to know to roll in it.

09:22

Publish Settings

The Flash Publish settings in action. In this session we get to learn the basics of the publish settings and how to work with it.

08:47

Split Paths

Hint Hint we want you to pick OOP. in this intro we will explain why its important to go the transition into OOP way of coding.

03:32

Split Paths : OOP

In this video, we take a step further into our object orientated programming world.

07:31

Split Paths : Timeline Coding

In this title we outline the options you have as a developer and help you understand why it would be a good idea to move to OOP

03:15

How To Use Samples

We walk through the source files of our Flash ActionScript project

01:12

Building It Up From Scratch

In this video we redo our work and build together a class and connect it to our flash interface.

05:09