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

Setting up our source files

Welcome to the first chapter in our course. In this lecture we will set up our source files. In the process will see how to integrate external JavaScript files. This course assumes you know JavaScript. If you don't, please check out one of our starter courses in JavaScript.

Video Transcript

00:00I am so thrilled to have you in this chapter and in this course.
00:05If you know already some JavaScript, then you're ready and set and ready to start learning.
00:09You don't need anything else to start learning G-SAP or just jump right ahead.
00:14If you're one of our students from our getting started or you don't know how to get started,
00:18I suggest you go to our learning JavaScript with animation because that's going to be
00:22the foundation block to this course.
00:25Now, in this chapter, in this lesson itself, we're going to dive deeper into our source
00:31files, our structures, our build, we're going to catch up with whoever is just joining us
00:35right now.
00:36We're going to have a regroup, kind of show you how the file structures are working.
00:40If you've been in our last course, it's a little bit different than the last course, so make
00:44sure you watch this lesson anyways, so let's get started.
00:47The first thing I want to talk about is our sample files, well, those are sample files.
00:53So once you download the source files, you're going to see that there's your HTML files
01:00that will start with the name of the chapter, the start and end, and you'll also find your
01:05artwork if there are any images in a chapter, you'll find them in the art folder.
01:10You'll find your CSS items in the CSS area as well, and last but not least, all of
01:15our source files are going to be located in the JS folder.
01:19So now that I said that I'm going to open up that start file, so let's go ahead and
01:23do that, and in the source file itself, and we could change this name, so this is going
01:30to be, I'll fill it up later, so first of all you can see the CSS is already configured
01:35and I'm going to automatically upgrade the chapters if it's a different layout or if
01:40I change something in the CSS itself.
01:43Now the one thing that I'm not going to talk about at all throughout the chapters
01:46is how to configure jQuery and also how to, well, basically how to configure jQuery,
01:52so I'm going to go ahead and I'm going to do it right away with you, and this is going
01:54to be the only time we talk about it, we're going to create a new script tag, and I'm
01:59not going to set the type because we're in HTML5, and I'm just going to set the source,
02:05and I'm just going to automatically load it externally, but you are always invited to
02:10load it locally if you want to, I'm going to just take the minify jQuery and just add
02:15it, right now I'm taking the current version, the current one dot latest version, but obviously
02:21you could use whatever version, we're not going to really do too much with jQuery, the
02:25only thing we're going to be doing with our jQuery is, or the main thing that we're
02:29going to do with jQuery is start up our application, or get our application to
02:34start once the page is completely loaded, and to do that we're going to have a
02:38starter function which we're going to call on ready, and we're going to see
02:42this function throughout our code, unless we do something else, but in
02:46general we're going to see the on ready function, and we're also going to see
02:49that we're going to start off with calling that document, not doc type, document,
02:55and we're going to call the ready function, making sure that on ready is
03:00called whenever our application is loaded, we're not going to talk about the logic
03:04behind it because we already covered that in our getting started with
03:08JavaScript using animation, or learning animation through JavaScript, but this is
03:12going to be our basic starting point, and we'll always have a little alert
03:16inside there that is just going to remind us in what chapter we're in, and
03:20that's it. This is our quick intro to how to work with the source files, but in
03:25general from all the files you're going to see, the starting point is going to
03:28look very similar to this. We'll have already jQuery integrated, we'll have
03:33already the source files integrated, and usually we'll also have the animation
03:37library integrated, and that will be our next topic in the next lesson before we
03:43start digging deeper into starting to animate. In the next lesson, we're going
03:47to talk about how do we load in tween max, or tween light, or plugins. We're
03:53going to understand the difference between them and how do we get them up
03:56and running, and again you could choose to download the files locally, or you
04:00could choose not to download the files locally. Both options are completely fine.
04:04Now when I say that we're going to work with the script tag, most chances
04:08are that we're going to work with an external file, so how about I show you how
04:13we integrate the same logic only in an external file. If you don't know how to do
04:17it, then now you will, and if you do know it then you know you could probably skip
04:22this section, because all I'm really going to do here is I'm going to direct
04:26our users into a folder inside of our JS folder, and we just a file in the JS
04:31folder, so I'll just call it JS, and I'll call it chapter 1.js. All that I really
04:35need to do next is actually create a file, and then move the script into there,
04:40get rid of this, and just grab this code, and just paste it into that file, which
04:45is what I'm going to do in our break right now, and when we come back we're
04:49going to talk about our integration of tween max, between library of
04:55GSAP as well.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!