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

Creating Our Main

Once more we create a quick class - our base class.

Video Transcript

00:00And I'm going to go into my properties, because I want to create that main class.
00:04So I'm just going to type your main, uppercase M, and this is the class that we are really
00:09the most used to.
00:11We created it so many times.
00:14So let me just go into the edit mode of it, and it's going to ask me where, because I'm
00:17in CS5.5, but that's fine.
00:20And I'm going to save it right in the same folder as my OP is.
00:25So I have my main.
00:26Now, by default, Flash CS5 and Flash CS5.5 is going to create a few lines that are quite
00:34helpful so we don't have to type them ourselves, but really, all we really did here is we created
00:38a blueprint.
00:39We created a blueprint that has a name.
00:42Why does it have a name?
00:43Let me ask you guys, why do blueprints have names?
00:46Yeah, okay, so both answers are perfect, right?
01:01So if they didn't have a name, we wouldn't be able to recognize them.
01:04So even our main class, which we probably will only create only one time, it has a name.
01:10Some programming languages don't give a name to the main class, it's just built a little
01:13bit differently.
01:14But that doesn't really matter to us, because it assumes that it's going to be created only
01:19once, so it could be anonymous.
01:21And there's such a thing as anonymous classes, but we don't need anonymous classes, because
01:25we have a main.
01:26And the reason why is because we are linking from here, and we could change the class,
01:32we could have a few applications, let's say one is for the iPhone, and one is for a regular
01:36desktop, and we could just change our class based on the need.
01:40So our main class could change, and we could publish a few different applications that
01:43way.
01:44Or maybe we're creating a few games, but we're using the same interface or so on
01:48and so forth.
01:49So Flash didn't link these two together automatically, you have to manually tell Flash, okay,
01:53I want to create a new class, which is going to be our first thing that's created, actually
01:57our stage, everything is actually going to be wrapped inside of it.
02:02And then we give it that name, so then we have our class.
02:04Now we've seen the syntax, and we didn't dig too too deep into it, we did read into it,
02:09we did look a little bit into these things, but we're definitely going to break this
02:12apart much more deeply.

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!