Tuesday, October 6, 2009

Lesson 3

More Functions
- homework review
- functions that take a library skin
- for loop review
- functions that return sprite or shape
- combining functions
- sketching with functions, design before implementation
- wrapper functions
- function Q and A

Variables and Function Uses
- Simplest use for variables is readability and organization
- Main use for variables is significant added flexibility
- Simplest use for function is readability and organization
- Main use for functions is significant added flexibility

Writing More Dynamic code
- in class exercise to create bar graph hardcoded
- convert our in class hard coded example to be more dynamic using
variables, functions and the Event Object.

Terminology
- Variable
- Data Type
- Casting
- Property
- Function
- Argument
- Return Value
- Implementation
- Client Code
- Linkage Class - the class associated with a library element (new Blob())
- Class - is a group of functions (methods) and variables that work together.

TweenLite
- examples and in class demo

Graphics Class
...

Reading
- linkage classes
- tween lite

Homework
Create a website navigation using variables, functions and linkage classes. If one of your homework assignments has lots of redundant code, try to make it more dynamic using variables, functions, evt.currentTarget/evt.target and for loops.

I'm going to upload a file at some point on thursday for you to make more dynamic - this file will be sort of like dynamic1.fla and it will be your job to make the code more elegant and dynamic

Classfiles

18 comments:

  1. In a for loop, is there a way to do something like this?

    navItems.push(var navIcon:MovieClip = drawCircle(size));

    or does it have to be written like this?

    var navIcon:MovieClip = drawCircle(size);
    navItems.push(navIcon);

    ReplyDelete
  2. thanks craig,

    navItems.push(drawCircle(iconSize))

    works.

    ReplyDelete