SlideShare a Scribd company logo
Programming with Action Script 3.0 the
              basics
What to expect
1. Little over two hours of hardcore Action
   Script fun!
2. You will probably forget most of it all
3. Don't feel bad if you don't get it, study
   session after it all is done.
4. There is never a stupid question, if you
   don't get it speak up!
5. Probably moving your car at least once...
Why should I trust you to teach me anything?

  1. I have been worked on both
     games and enterprise
     applications using Action Script
  2. Experience using Action Script
     and Flash for well over 6 years
     now.
  3. I enjoy helping others, so ask
     questions!
It's all one big game!
You all are adventures on your own quests for knowledge, each quest making you stronger


   1.   Each player will gain community xp to level up their character in
        meetup
   2. Everyone's rank will be of "newb" in the community, leveling will be
        figured out later.
   3. For doing the hello world.
   4. Your avatar will be your meetup image, all data will be represented
        eventually on Sacgamehub.com
   5. One xp point is given based on certain conditions
         a. Coming on time
         b. Having tools setup already
         c. Helping out fellow student
         d. Completing quest
         e. Defeating the boss
         f. Random encounter success (random question asked)
   3. Leader board of players with most xp counted up at the end of the day.
   4. Quests are completed by student completing project in time given
   during presentation
   5. treasure for completing a quest is candy :-D
What's the agenda for today?
 1.   Explain the format of the class
 2.   Get everyone set up with their tools
 3.   Quick intro into Flash and Action Script 3.0
 4.   Do simple "Hello World" on the screen
 5.   Outline core concepts will be going over
 6.   Go over first core concept "Variables"
 7.   Go over second core concept "Collections"
 8.   10 minute break
 9.   Go over third core concept "Conditionals"
10.   Go over fifth core concept "Loops"
11.   10 minute break
12.   Go over sixth core concept "functions"
13.   Go over seventh core concept "error handling"
14.   Project using everything learned
15.   Q&A
16.   Where to go from here?
17.   Study time
Explain format of class
1.   Quick lecture on core concept
2.   Quick Q&A on concept
3.   Show written example
4.   Show example
5.   Class tries it out for themselves
6.   Repeat it three times
7.   Exercise doing something new with concept
8.   Everyone shows their work
Get everyone set up with their tools
1.   Download and setup FDT
2.   Point it to the proper SDK
3.   Install the debug Flash Player
4.   Get everyone to join google hangout
5.   Bookmark http://help.adobe.
     com/en_US/FlashPlatform/reference/actions
     cript/3/index.html
What is Flash?
What is the Flash Player? Is a multimedia platform that
allows you to create really engaging applications for the web, mobile, and
desktop space.


What is Action Script 3.0? Is the programming language
used to build the applications that the Flash Player understands so it can
display the contents to the user.
trace( "Hello world" );
Core concepts we will focus on! (The quests)



1.   Variables/Types
2.   Collections
3.   Conditionals statements
4.   Control-flow statements
5.   Functions
6.   Error handling
Variables/Types Quest
Description: A variable is a named place
holder for a value of a certain type.

Goal:
var myVariable:String = "hello world";

Objective: Create a variable that says
something silly!
Types we will focus on
1. String: Represents a collection of
   alphanumeric characters
2. int: Represents an integer, will allow us to
   do simple math like equations
3. Number: Represents an integer with a
   decimal value
4. Boolean: Represents either true or false
5. Array: Will allow us to store a collection
   of different types
Math Quest
Description: There are different ways to add,
subtract, divide and multiply variables using
the different operators

Goal:
one + two = 3;

Objective: Create two variables that when
multiplied equal 10

Note: Go here for more info on other operators you can use http://help.adobe.
com/en_US/FlashPlatform/reference/actionscript/3/operators.html
Collections Quest
Description: A variable of type Array will
allow you to store a collection of values

Goal:
var myArray:Array = [1, 2, 3];
trace( myArray[0] ); //1

Objective: Create an array where it's third
index contains a numeric value.

Note: arrays are always zero indexed and can store any value
Note: each spot in an array is called an index
Conditionals
Explain: Using a conditional statement such
as an "if" statement allows you to create
multiple conditions for a particular piece of
code.

Example:
if ( myVariable == "hello world" ) { trace( "hello world" ); }
else { trace( "not hello world" ); }


Exercise: Create a simple conditional
statement checking if variable not equal
More on conditionals
multiple conditions:
if ( myVariable == "hello world" ) { trace( "hello world" ); }
else if( myVariable == "not hello world" ) { trace( "not hello world" ); }
else { trace( "something else" ); }

Not:
if ( myVariable != "hello world" ) { trace( "not hello world" ); }
And:
if ( myVariable != "hello world" && myVariable != "not hello world" ) {
trace( "something else" ); }
Or:
if ( myVariable != "hello world" || myVariable == "not hello world" ) { trace
( "joe is awesome" ); }
Greater then:
if ( myVariable >= 1 ) { trace( "greater then one" ); }
less then:
if ( myVariable <= 1 ) { trace( "greater then one" ); }
Control-flow Quest

Description: Control-flow statements allow
you to execute a set piece of code
repeatedly based on a given condition.

Goal:
while( variable == true ) { trace ( "variable is true" ); }
for( var i:int = 0; i < 3; i++ ) { trace( "variable is " + i ); }



Objective: Use one of the control-flow
statements and variables to say the word
"Hello world" five times.
Functions Quest
Description: A function is an easy way to
repeatedly execute large chunks of code all
throughout your program.

Example:
public function myHelloWorldFunction():void { trace( "hello world" ); }
myHelloWorldFunction();

public function myNewFunction( myHelloWorldVariable:String ):String { return
myHelloWorldVariable; }
trace ( myNewFunction ( myHelloWorldVariable ) );

public function myMathFunction( one:int, two:int ):int { return one + two; }
trace ( myMathFunction ( one, two ) );



Exercise: Return back a silly message of your own
Boss Battle! :-D
In order to defeat the boss you must utilize
everything you have learned to defeat him. Do
this by creating a program using all the new
skills you have learned today. The program
adds bonus of +2 to your total xp if you used all
the core concepts which will act as your life.
Winning will get you the treasure of more candy
and +5 to your xp.

We will use Math.random() in the end and
create a loop to fight against the monster hp 15
Q&A
WHERE TO GO FROM HERE!
1.   Experiment more with what you have learned
2.   Explore the AS3 docs and try out new stuff!
3.   Go to google and type in "learn actionscript 3.0"
4.   Come back and take my other classes :-D
5.   Scribd is a great site for reading e-books on action script 3.0 related topics
     here are two books id recommend diving into after this class http://scr.
     bi/PepTsh and http://scr.bi/Aj4ArC
Community Achievements
1. Attended your first class!
2. Became a Teacher
3. Attended 4 game jams!
4. Presented your game at a meetup
5. Mingled and got 10 business cards
6. Started a game team through meetup
7. Got a job in the industry using the meetup
8. Released a game with an idea you got from
   the meetup
9. Stayed on the top of the leaderboard for
   whole two months

More Related Content

Similar to Programming in as3 the basics

Mastering Python lesson 3a
Mastering Python lesson 3aMastering Python lesson 3a
Mastering Python lesson 3a
Ruth Marvin
 
Build a Virtual Pet with JavaScript (May 2017, Santa Monica)
Build a Virtual Pet with JavaScript (May 2017, Santa Monica) Build a Virtual Pet with JavaScript (May 2017, Santa Monica)
Build a Virtual Pet with JavaScript (May 2017, Santa Monica)
Thinkful
 
Intro to OOP
Intro to OOPIntro to OOP
Intro to OOP
Gant Laborde
 
Implmenting an Experiment in oTree
Implmenting an Experiment in oTreeImplmenting an Experiment in oTree
Implmenting an Experiment in oTree
eurosigdoc acm
 
Build tic tac toe with javascript (3:28)
Build tic tac toe with javascript (3:28)Build tic tac toe with javascript (3:28)
Build tic tac toe with javascript (3:28)
Thinkful
 
Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loops
Ruth Marvin
 
Build a virtual pet with javascript (may 2017)
Build a virtual pet with javascript (may 2017)Build a virtual pet with javascript (may 2017)
Build a virtual pet with javascript (may 2017)
Thinkful
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
Dan Phiffer
 
Rits Brown Bag - TypeScript
Rits Brown Bag - TypeScriptRits Brown Bag - TypeScript
Rits Brown Bag - TypeScript
Right IT Services
 
The Ring programming language version 1.8 book - Part 7 of 202
The Ring programming language version 1.8 book - Part 7 of 202The Ring programming language version 1.8 book - Part 7 of 202
The Ring programming language version 1.8 book - Part 7 of 202
Mahmoud Samir Fayed
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
RabiyaZhexembayeva
 
AbadIA: the abbey of the crime AI - GDG Cloud London 2018
AbadIA:  the abbey of the crime AI - GDG Cloud London 2018AbadIA:  the abbey of the crime AI - GDG Cloud London 2018
AbadIA: the abbey of the crime AI - GDG Cloud London 2018
Juantomás García Molina
 
05 laboratory exercise 2
05 laboratory exercise 205 laboratory exercise 2
05 laboratory exercise 2
Anne Lee
 
Advanced java script essentials v1
Advanced java script essentials v1Advanced java script essentials v1
Advanced java script essentials v1
ASHUTOSHPATKAR1
 
What does OOP stand for?
What does OOP stand for?What does OOP stand for?
What does OOP stand for?
Colin Riley
 
Java Basics V3
Java Basics V3Java Basics V3
Java Basics V3
Sunil OS
 
55 new things in Java 7 - Devoxx France
55 new things in Java 7 - Devoxx France55 new things in Java 7 - Devoxx France
55 new things in Java 7 - Devoxx France
David Delabassee
 
Selenium web driver | java
Selenium web driver | javaSelenium web driver | java
Selenium web driver | java
Rajesh Kumar
 

Similar to Programming in as3 the basics (20)

Mastering Python lesson 3a
Mastering Python lesson 3aMastering Python lesson 3a
Mastering Python lesson 3a
 
Build a Virtual Pet with JavaScript (May 2017, Santa Monica)
Build a Virtual Pet with JavaScript (May 2017, Santa Monica) Build a Virtual Pet with JavaScript (May 2017, Santa Monica)
Build a Virtual Pet with JavaScript (May 2017, Santa Monica)
 
Intro to OOP
Intro to OOPIntro to OOP
Intro to OOP
 
Implmenting an Experiment in oTree
Implmenting an Experiment in oTreeImplmenting an Experiment in oTree
Implmenting an Experiment in oTree
 
Build tic tac toe with javascript (3:28)
Build tic tac toe with javascript (3:28)Build tic tac toe with javascript (3:28)
Build tic tac toe with javascript (3:28)
 
Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loops
 
All of javascript
All of javascriptAll of javascript
All of javascript
 
Build a virtual pet with javascript (may 2017)
Build a virtual pet with javascript (may 2017)Build a virtual pet with javascript (may 2017)
Build a virtual pet with javascript (may 2017)
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Rits Brown Bag - TypeScript
Rits Brown Bag - TypeScriptRits Brown Bag - TypeScript
Rits Brown Bag - TypeScript
 
The Ring programming language version 1.8 book - Part 7 of 202
The Ring programming language version 1.8 book - Part 7 of 202The Ring programming language version 1.8 book - Part 7 of 202
The Ring programming language version 1.8 book - Part 7 of 202
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
 
AbadIA: the abbey of the crime AI - GDG Cloud London 2018
AbadIA:  the abbey of the crime AI - GDG Cloud London 2018AbadIA:  the abbey of the crime AI - GDG Cloud London 2018
AbadIA: the abbey of the crime AI - GDG Cloud London 2018
 
05 laboratory exercise 2
05 laboratory exercise 205 laboratory exercise 2
05 laboratory exercise 2
 
Advanced java script essentials v1
Advanced java script essentials v1Advanced java script essentials v1
Advanced java script essentials v1
 
What does OOP stand for?
What does OOP stand for?What does OOP stand for?
What does OOP stand for?
 
Java Basics V3
Java Basics V3Java Basics V3
Java Basics V3
 
Design patterns
Design patternsDesign patterns
Design patterns
 
55 new things in Java 7 - Devoxx France
55 new things in Java 7 - Devoxx France55 new things in Java 7 - Devoxx France
55 new things in Java 7 - Devoxx France
 
Selenium web driver | java
Selenium web driver | javaSelenium web driver | java
Selenium web driver | java
 

Recently uploaded

National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 

Recently uploaded (20)

National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 

Programming in as3 the basics

  • 1. Programming with Action Script 3.0 the basics
  • 2. What to expect 1. Little over two hours of hardcore Action Script fun! 2. You will probably forget most of it all 3. Don't feel bad if you don't get it, study session after it all is done. 4. There is never a stupid question, if you don't get it speak up! 5. Probably moving your car at least once...
  • 3. Why should I trust you to teach me anything? 1. I have been worked on both games and enterprise applications using Action Script 2. Experience using Action Script and Flash for well over 6 years now. 3. I enjoy helping others, so ask questions!
  • 4. It's all one big game! You all are adventures on your own quests for knowledge, each quest making you stronger 1. Each player will gain community xp to level up their character in meetup 2. Everyone's rank will be of "newb" in the community, leveling will be figured out later. 3. For doing the hello world. 4. Your avatar will be your meetup image, all data will be represented eventually on Sacgamehub.com 5. One xp point is given based on certain conditions a. Coming on time b. Having tools setup already c. Helping out fellow student d. Completing quest e. Defeating the boss f. Random encounter success (random question asked) 3. Leader board of players with most xp counted up at the end of the day. 4. Quests are completed by student completing project in time given during presentation 5. treasure for completing a quest is candy :-D
  • 5. What's the agenda for today? 1. Explain the format of the class 2. Get everyone set up with their tools 3. Quick intro into Flash and Action Script 3.0 4. Do simple "Hello World" on the screen 5. Outline core concepts will be going over 6. Go over first core concept "Variables" 7. Go over second core concept "Collections" 8. 10 minute break 9. Go over third core concept "Conditionals" 10. Go over fifth core concept "Loops" 11. 10 minute break 12. Go over sixth core concept "functions" 13. Go over seventh core concept "error handling" 14. Project using everything learned 15. Q&A 16. Where to go from here? 17. Study time
  • 6. Explain format of class 1. Quick lecture on core concept 2. Quick Q&A on concept 3. Show written example 4. Show example 5. Class tries it out for themselves 6. Repeat it three times 7. Exercise doing something new with concept 8. Everyone shows their work
  • 7. Get everyone set up with their tools 1. Download and setup FDT 2. Point it to the proper SDK 3. Install the debug Flash Player 4. Get everyone to join google hangout 5. Bookmark http://help.adobe. com/en_US/FlashPlatform/reference/actions cript/3/index.html
  • 8. What is Flash? What is the Flash Player? Is a multimedia platform that allows you to create really engaging applications for the web, mobile, and desktop space. What is Action Script 3.0? Is the programming language used to build the applications that the Flash Player understands so it can display the contents to the user.
  • 10. Core concepts we will focus on! (The quests) 1. Variables/Types 2. Collections 3. Conditionals statements 4. Control-flow statements 5. Functions 6. Error handling
  • 11. Variables/Types Quest Description: A variable is a named place holder for a value of a certain type. Goal: var myVariable:String = "hello world"; Objective: Create a variable that says something silly!
  • 12. Types we will focus on 1. String: Represents a collection of alphanumeric characters 2. int: Represents an integer, will allow us to do simple math like equations 3. Number: Represents an integer with a decimal value 4. Boolean: Represents either true or false 5. Array: Will allow us to store a collection of different types
  • 13. Math Quest Description: There are different ways to add, subtract, divide and multiply variables using the different operators Goal: one + two = 3; Objective: Create two variables that when multiplied equal 10 Note: Go here for more info on other operators you can use http://help.adobe. com/en_US/FlashPlatform/reference/actionscript/3/operators.html
  • 14. Collections Quest Description: A variable of type Array will allow you to store a collection of values Goal: var myArray:Array = [1, 2, 3]; trace( myArray[0] ); //1 Objective: Create an array where it's third index contains a numeric value. Note: arrays are always zero indexed and can store any value Note: each spot in an array is called an index
  • 15. Conditionals Explain: Using a conditional statement such as an "if" statement allows you to create multiple conditions for a particular piece of code. Example: if ( myVariable == "hello world" ) { trace( "hello world" ); } else { trace( "not hello world" ); } Exercise: Create a simple conditional statement checking if variable not equal
  • 16. More on conditionals multiple conditions: if ( myVariable == "hello world" ) { trace( "hello world" ); } else if( myVariable == "not hello world" ) { trace( "not hello world" ); } else { trace( "something else" ); } Not: if ( myVariable != "hello world" ) { trace( "not hello world" ); } And: if ( myVariable != "hello world" && myVariable != "not hello world" ) { trace( "something else" ); } Or: if ( myVariable != "hello world" || myVariable == "not hello world" ) { trace ( "joe is awesome" ); } Greater then: if ( myVariable >= 1 ) { trace( "greater then one" ); } less then: if ( myVariable <= 1 ) { trace( "greater then one" ); }
  • 17. Control-flow Quest Description: Control-flow statements allow you to execute a set piece of code repeatedly based on a given condition. Goal: while( variable == true ) { trace ( "variable is true" ); } for( var i:int = 0; i < 3; i++ ) { trace( "variable is " + i ); } Objective: Use one of the control-flow statements and variables to say the word "Hello world" five times.
  • 18. Functions Quest Description: A function is an easy way to repeatedly execute large chunks of code all throughout your program. Example: public function myHelloWorldFunction():void { trace( "hello world" ); } myHelloWorldFunction(); public function myNewFunction( myHelloWorldVariable:String ):String { return myHelloWorldVariable; } trace ( myNewFunction ( myHelloWorldVariable ) ); public function myMathFunction( one:int, two:int ):int { return one + two; } trace ( myMathFunction ( one, two ) ); Exercise: Return back a silly message of your own
  • 19. Boss Battle! :-D In order to defeat the boss you must utilize everything you have learned to defeat him. Do this by creating a program using all the new skills you have learned today. The program adds bonus of +2 to your total xp if you used all the core concepts which will act as your life. Winning will get you the treasure of more candy and +5 to your xp. We will use Math.random() in the end and create a loop to fight against the monster hp 15
  • 20. Q&A
  • 21. WHERE TO GO FROM HERE! 1. Experiment more with what you have learned 2. Explore the AS3 docs and try out new stuff! 3. Go to google and type in "learn actionscript 3.0" 4. Come back and take my other classes :-D 5. Scribd is a great site for reading e-books on action script 3.0 related topics here are two books id recommend diving into after this class http://scr. bi/PepTsh and http://scr.bi/Aj4ArC
  • 22. Community Achievements 1. Attended your first class! 2. Became a Teacher 3. Attended 4 game jams! 4. Presented your game at a meetup 5. Mingled and got 10 business cards 6. Started a game team through meetup 7. Got a job in the industry using the meetup 8. Released a game with an idea you got from the meetup 9. Stayed on the top of the leaderboard for whole two months