Complete step-by-step guide on how to build a Flash application from scratch. Learn every dynamic of the file structure, and how to run the application you build. This is basically a summary video for the videos you have already watched; you should, feel somewhat comfortable by now as you're coding in your custom workspace you created in this video.
From creating a new folder to seeing the output display, you will do it all in this final Starting Point lesson - and be ready for some real, hands-on coding.
For beginning developers, your next course will be Coding Basics 1. There, you'll learn about strings (not the kind you use to play with your cat,) computing math through basic methods such as sqrt(), and discovering the wonders of variables. (Part 2 will cover variables in depth.)
For experienced developers, maybe you need to brush up on Functions or really learn about Objects and why they're the buzz in our geeky world.
Stretch those wings to learn Javascript, to learn XML or how to design mobile apps! It's all here, it's all designed to teach with attention to detail, and it's all fun!
Time for a subscription, wouldn't you say?
Nothing is new, but what we're going to do right now is build our
application from scratch assuming that we've
never downloaded the file. If you're very comfortable
with all the new videos that we've done so far,
then you don't really have to watch this one,
but if you feel like having a little
bit more rehearsal before we actually start programming,
so let's do it!
what we want to do first is create a new
folder,
and call it "project files":
in the "project files" folder I'm going to create 2
new folders.
One will be my deploy,
and the next will be my source.
So I have my source and I have my deploy.
Next thing is to open Flash,
and now I'm working on Flash CS5,
and I'm going to create a new ActionScript 3.0 file.
(I created a new ActionScript 3.0 file and
now I want to save it.) So I'm going to go to file> save as,
I'mmaking sure I'm in my source folder, pn my
desktop,
(project files, source)
and I'm going to call it main.fla,
and I'm going to save it.
Now that I saved my main, I want to change my publish settings,
so II'm going to go to file> publish settings,
and then in my Flash configuration, I'm going to change
it to one folder back,
deploy, and another slash.
Same thing here,
dot dot, one folder back, deploy, slash, (..deploy/)
and I want to change it from main to index,
and I'm going to click ok,
and I'm going to save my file again,
I'm going to go to my file,
and I'm going to publish it. Just make sure that when we go back
in here that in our deploy, we have our main,
and we have our index.html.
Perfecto! So back in our main, we want to now create
our *.as file in which we are going
to store all of our ActionScript.
So we're going to go and click on file> new
and then I'm going to select an ActionScript 3.0 class.
I'm going to click okay.
Because I'm working with
flash CS5, it's going to generate for
me some stuff dynamically so I want to call
it main, my class, and I'm going to click ok,
and it's going to automatically create
a lot of things for me that I need,
so I don't have to type them myself.
But let's assume that it didn't, just for people
that are
not running on CS5. So I'm just going to delete
all those goodies.
Let's start typing.
First of all we're going to create a new package,
we're going to open a bracket,
and we're going to close a bracket. Flash CS5 automatically
is going to
do that extra goody of closing the bracket for
me.
I'm going to type now, import, space, Flash dot, display dot, movie clip.
Now we're going to create a new class. So we're going to set up our
public class, we're going to call it main,
extends movie clip.
Now don't worry about what this all means.
It's really just about making sure you have
all this for now,
and what we recommend is just to download the
source
anyway because until you really understand what
it is,
it doesn't really mean too much to type it,
but it's good practice, it doesn't hurt.
Next thing we want to do, is we want to create
our function.
public, function, main,
we want to make sure that the names all match up,
uppercase M, all the rest lowercase,
and public main, this time around we're going to open a round
bracket, close a around bracket,
open curly bracket,
and then close a curly bracket.
There we go! We have everything set up. All that's
left is we want to save the file.
So we're going to click on file> save,
we're going to take it in the same folder, we're going to call it
main.as.
Now back to our main.fla, we will want
to go into our publish settings,
and then in our class set it to be main.
Let's just make sure that it works. Click
on "edit class definition,"
and we see that they're linked together,
and just to prove it we're
going to put here a little
trace on line 6.
So this is basically what we've done in all
the past videos only really quickly.
It would be good practice
to just get used to typing it. It does not hurt at
all to know how to do it even if we do
understand all the intricacies
of the code inside
for now. As time goes by, we evolve as programmers course by course, and ultimately
we're going to completely understand every single line here.
So just run it, see our "Hello world"
and this is a wrap