Echo - Setting Up The File Structure
Creating the main fla and main class.rn
Video Transcript
00:01Okay, while you were gone, I created a file structure for us.
00:07So inside of EC, you'll find, it's a little bit more organized now, there'll be a deploy
00:12folder, there's a deploy folder inside of our source folder.
00:15I just grabbed the package of ASFLA events with our three classes, and I've created
00:22a new com folder for our project which is going to be com, everything FLA, samples, event
00:30controller where all our samples in this course are going to be placed in.
00:34Okay, so now that we have our file structure which you can download, let's create our FLA
00:40and create our main class and associate our FLA with that main class so we can start working
00:44on events.
00:45Okay, so I'm going to go inside of flash right now, and I'm going to open up a new
00:50flash ActionScript 3 file which it doesn't really matter what flash version you're running
00:56on as long as you can create ActionScript 3 files.
00:59So I'm just going to go directly, create a new AS3 file, and I'm going to directly
01:04just save the file, and I'm going to save it into our source directory, oh this is not
01:11our folder, desktop EC source, and let's give our file name adding events, save that.
01:22And now that we have a saved FLA, let's create our class by going into file, new,
01:29and selecting ActionScript file from the type, I'm going to click OK.
01:34Now that I have my ActionScript file, I'm going to create our source path which first
01:39we're going to put inside of our package, package, and my package is com everything FLA, samples,
01:51event controller, so that was our package.
01:56Let's create our class, public class, which we will call, create the constructor, all right
02:07so we have our file, let's just save it now, so let's just copy the name, and let's save
02:12it, so again I'm going to go to our desktop, enter our source, com folder, and enter our
02:20event controller, and rename this whole thing to adding events, done, okay so now we have
02:34our FLA, and we have our AS file, let's just add a trace inside here just to make sure
02:38that everything is working, echo, and the last thing we want to do is we want to just fix
02:47this microphone, it's moving around, so now that we have all our files all set up, the
02:53last thing we have to do is just link between our FLA and our AS file, so I'm just going
02:57to copy this whole class path, because I really don't want to type that again, dot the name
03:03of our class, and that's good, back to the FLA, and we're going to go into our properties,
03:13we're going to paste inside our class path, save our FLA, click on enter here, and something
03:23is wrong here, let's double check if we didn't, so com everything FLA, samples, event controller,
03:33adding events main, looks fine to me, go back there, properties, paste, enter, there we go,
03:41so we're going to save this, let's just click and see that it connects, and it does, I'm
03:46going to save the file, and command enter to see if we're going to get our echo to see,
03:51oh, we got a little error here, the class com, everything else samples, must subclass,
03:57display, yes, good catch, so I forgot to extend the movie clip, so let's do that right
04:03now, import, flash, display, movie clip, and then we're going to go to our class, extends,
04:13extends movie clip, let's run this again, and we got our echo.
