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

Split Paths : Timeline Coding

<p>Reviewing the more simple and traditional way of developing in flash: taking the easy path. In this video we break down the timeline and explain how to utilize it with code for Flash. </p> <h1>Split Paths cont. Timeline Coding</h1> <p>For Flash coding, if you choose not to work in OOP the opposing alternative is timeline coding. Learn what this means, how to create a layer, and use frames effectively. Start by simply clicking the first frame on the TimeLine, opening the Actions Panel, and then typing:<br /> <br /> trace (&quot;Hello World&quot;);<br /> <br /> Find out what happens when you run this application! <br /> <br /> Now you see the different paths available for programming in Flash: the traditional timeline coding, or OOP. While Timeline coding is simple to begin with, the longer you do it, the harder it gets as you must search for more complicated things to add. If you simply start coding using OOP, possibly the learning curve is steeper but the farther you go, the easier it gets. In the long run, OOP saves time and trouble: this verifies the answer to &quot;why use OOP&quot;&nbsp;!</p> <h2>Timeline Coding Video Transcript</h2> <div class="expandable"><pre> Now if you choose not to work in this format, and again we recommend that you do, but if you choose not to, the way you would do that is if you click on your main again and you get back into your main.fla, and you go into your properties panel, what you would want to do is delete your main reference: now there's no linkage between our main and our class. If we'd now click on our edit, it's not going to go anywhere. It's going to ask us to put a name because we don't really have one. So I'm going to save my file now. Now because I've opened this file previously in a earlier version, it's asking me if I want to save it up to Flash CS5. So I'm not going to save it right now because it's not really important for me to save. If I run the application now, it's going to output nothing, because there's no connection now between our main and our *.as file. The way we would program in Flash if we choose to work not in an object oriented mode is to go to our timeline, we're going to create a new layer, and we're going to name that layer, so I'm going to double click on layer two, I'm going to select everything, and I'm going to type here "as" just to make sure that everyone knows that our code is in the *.as layer. Now that we have our *.as selected, I have to select the first frame. Every one of these lines are possible frames, although they're disabled -- these don't exist yet. The only active frames right now are these two, and I want to select my frame right now in frame one, and now that it's selected, I could click on my window> actions panel. Now, make sure that you don't have something selected by mistake, , so if I just go here and create a rectangle, and it has a really big thick stroke, but that's fine, and you can see that now that it's selected, you'll see that in ActionScript 3.0, code cannot be placed directly on objects. Please select a frame or use the code snippets panel yadda yadda yadda. To our point, what that means is that we want to make sure that our frame is selected and not the object. The way I make sure that that will happen is that, for any items that I create, I don't create on the same layer as my *.as layer. So I'd like to just lock my *.as layer, making sure that I won't put anything on it. So I could select that layer, and directly go into my actions frame in my actions panel, and then I could start coding, so for example if previously we saw the sample of "hello world," let's create that sample again. We could just type "trace," open a round bracket, open a double quote, type Hello, space, world, close our double quote, close our round bracket, and then semicolon. trace ("Hello world"); Now if you run our application, we should be getting in our output panel, "hello world". That's all you really need to do to make that choice between our path of the object oriented path, and the traditional path of coding directly on the timeline. </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