Sunday, November 22, 2009
Monday, November 16, 2009
Lesson 6
Functions
Q & A
Visual Functions
- using dynamic variables, events and functions together
Procedural Pattern Navigation
- a pattern for creating simple site navigations
Mini-Site Review
- Review a small website that makes use of the techniques
covered in class
Homework:
Think of 10 functions that you wish were already part of flash. For example:
// draws a diamond that has a width and height of 10 pixels
drawDiamondShape(10,10);
You don't need to actually make the function work. Just write the function call (like above)
In the function_website.fla you'll notice that there is one version with a bunch of empty functions. I want you to create a mini-website... just two or three buttons and a few basic elements (similar to the one from class). Then think about all the different functions you would need to write to make that site work - you don't actually need to make the functions work, just write the names of them (like I did in the functions_website.fla).
You should also continue to practice writing functions - try to invent a few more "visual functions." (See all the fla files with the same name)
CLASS FILES
Q & A
Visual Functions
- using dynamic variables, events and functions together
Procedural Pattern Navigation
- a pattern for creating simple site navigations
Mini-Site Review
- Review a small website that makes use of the techniques
covered in class
Homework:
Think of 10 functions that you wish were already part of flash. For example:
// draws a diamond that has a width and height of 10 pixels
drawDiamondShape(10,10);
You don't need to actually make the function work. Just write the function call (like above)
In the function_website.fla you'll notice that there is one version with a bunch of empty functions. I want you to create a mini-website... just two or three buttons and a few basic elements (similar to the one from class). Then think about all the different functions you would need to write to make that site work - you don't actually need to make the functions work, just write the names of them (like I did in the functions_website.fla).
You should also continue to practice writing functions - try to invent a few more "visual functions." (See all the fla files with the same name)
CLASS FILES
Sunday, November 8, 2009
Lesson 5
Class Notes
General Q and A
Align Navigation Demo
Functions, Functions, Functions
Reading:
(the end of this post is pretty advanced.... and not super important... the important part is the version of what we did today...)
http://www.learningactionscript3.com/2008/05/13/the-power-of-relative-positioning/
Homework:
Be sure to look over the function_practice.fla and nerd_functions.fla. If you have
any questions about writing functions e-mail me. If you can't figure out how
to write one of the below functions, feel free to email me. You should also attempt to
write some functions that aren't on this list. Be creative and try to challenge yourself...
write functions related to subjects that interest you.
// converts meters to centimeters:
// takes one argument in meters
// returns the number in centimeters
mToCM(meters);
for the below two functions you can find the math you need here:
http://en.wikipedia.org/wiki/Kelvin
// converts fahrenheit to kelvin - (temperature);
// takes one argument, the degrees in fahrenheit
// returns degrees in kelvin
tempFtoK(32);
// converts kelvin to fahrenheit- (temperature);
// takes one argument, the degrees in kelvin
// returns degrees in fahrenheit
tempKtoF(32);
// use google to find the equations for these:
// millileters to fluid ounces, and fluid onces to millileters
// calculates the area of a rectangle:
// takes 2 arguments, width and height of the rectangle
// returns the area of the rectangle
area(10, 20);
// adds 3 numbers together
// takes 3 arguments and adds them together
// returns the result of the addition of the three arguments
add3(100, 20, 300);
Conversion/Math BONUS:
// calculates the volume of a cube
// takes 1 argument, the length of any side of the cube
// returns the area of the cube
area(100);
Take a look at how we wrote the setupBtn() function in the file: align_demo_zenos_functions.fla
Try to use this technique somewhere in one of your existing homework files or personal/work projects.
ClassFiles
General Q and A
Align Navigation Demo
Functions, Functions, Functions
Reading:
(the end of this post is pretty advanced.... and not super important... the important part is the version of what we did today...)
http://www.learningactionscript3.com/2008/05/13/the-power-of-relative-positioning/
Homework:
Be sure to look over the function_practice.fla and nerd_functions.fla. If you have
any questions about writing functions e-mail me. If you can't figure out how
to write one of the below functions, feel free to email me. You should also attempt to
write some functions that aren't on this list. Be creative and try to challenge yourself...
write functions related to subjects that interest you.
// converts meters to centimeters:
// takes one argument in meters
// returns the number in centimeters
mToCM(meters);
for the below two functions you can find the math you need here:
http://en.wikipedia.org/wiki/Kelvin
// converts fahrenheit to kelvin - (temperature);
// takes one argument, the degrees in fahrenheit
// returns degrees in kelvin
tempFtoK(32);
// converts kelvin to fahrenheit- (temperature);
// takes one argument, the degrees in kelvin
// returns degrees in fahrenheit
tempKtoF(32);
// use google to find the equations for these:
// millileters to fluid ounces, and fluid onces to millileters
// calculates the area of a rectangle:
// takes 2 arguments, width and height of the rectangle
// returns the area of the rectangle
area(10, 20);
// adds 3 numbers together
// takes 3 arguments and adds them together
// returns the result of the addition of the three arguments
add3(100, 20, 300);
Conversion/Math BONUS:
// calculates the volume of a cube
// takes 1 argument, the length of any side of the cube
// returns the area of the cube
area(100);
Take a look at how we wrote the setupBtn() function in the file: align_demo_zenos_functions.fla
Try to use this technique somewhere in one of your existing homework files or personal/work projects.
ClassFiles
Subscribe to:
Posts (Atom)