SlideShare a Scribd company logo
Advanced ActionScript Concepts
    IT 7220

    February 23, 2009


Sunday, February 22, 2009            1
Agenda

         Syllabus Updates
    ✤




         Game Assessment Papers
    ✤




         Rosenzweig - ActionScript 3.0/Game Programming University
    ✤




         Building Game Elements in ActionScript 3.0
    ✤




         HOT Lab - Flash Components and Forms
    ✤




         Work in Project Teams
    ✤




Sunday, February 22, 2009                                            2
Rosenzweig GP University

         Flash Game University (http://flashgameu.com/)
    ✤




               Companion Website to Book
          ✤




               Source code for all games referenced in text
          ✤




               Video tutorials
          ✤




               Blog
          ✤




               Forums
          ✤




Sunday, February 22, 2009                                     3
Rosenzweig Chap 1 Overview

         Review of Flash Interface
    ✤




         ActionScript in timeline and using document class files
    ✤




         Condition statements
    ✤




         Loops - For, While, Do
    ✤




         Use of Flash ActionScript Debugger
    ✤




         Game Programming Checklist
    ✤




Sunday, February 22, 2009                                         4
Simple ActionScript Program

         HelloWorld1.fla
    ✤




               ActionScript in timeline, output using Trace Function
          ✤




Sunday, February 22, 2009                                              5
Placing Objects on Stage

         HelloWorld2.fla
    ✤


               Still working with
          ✤

               ActionScript in the Timeline
               Create text field object
          ✤


               Assign a value to it
          ✤


               Place on stage (in display list)
          ✤


               No text parameters for control
          ✤
                                                            Stage
               over placement or appearance       (Display Object Container)


               of object
                                                      Main Timeline
                                                  (Display Object Container)




                                                         TextField
                                                      (Display Object)




Sunday, February 22, 2009                                                      6
Document Class Library

         HelloWorld3.as
    ✤


               All document classes are
          ✤

               derived from either the
               MovieClip or Sprite class
               MovieClip class is a container
          ✤

               class which includes the
               stage and timeline with each
               instance created
               This allows the text object to
          ✤

               be added to the movie clip
               Document class must then be
          ✤

               added to the Flash project file
               using the properties panel

Sunday, February 22, 2009                       7
Rosenzweig Chap 2 Overview

         Creating and working with visual objects
    ✤




         Player input
    ✤




         Controlling animation with ActionScript
    ✤




         Player Interaction via the Keyboard
    ✤




         Accessing external data
    ✤




         Arrays
    ✤




Sunday, February 22, 2009                           8
Visual Objects - Movie Clips

         We can add movie clips to our project by dragging them from the
    ✤

         library to the stage, and then adjusting appearance using the
         properties panel

         It is also possible to add movie clips from the library solely with
    ✤

         ActionScript, by setting the symbol linkage properties

         Lets take a look at the mascot movie clip in UsingMovieClips.fla
    ✤




         The MC timeline has four layers to make it easier to change the
    ✤

         animation a single part of the movie


Sunday, February 22, 2009                                                      9
Create MC Objects - Flash Interface



         Drag as many instances of a movie clip symbol onto the stage as you
    ✤

         want

         Position using select tool/properties
    ✤




         Scale and rotate using free transform tool
    ✤




Sunday, February 22, 2009                                                      10
Create MC Objects - ActionScript


         First, we make the movie clip accessible to ActionScript by setting the
    ✤

         Linkage properties (see Fig 2.2, p 43): enter Class name and select
         Export for ActionScript

         Next we use ActionScript to create a single instance on the stage at
    ✤

         x=275, y=150, and rotating the movie clip 10º to the right

         Finally, using a For loop, we create 10 additional instances of the
    ✤

         movie clip at y=300, spaced 150 pixels apart from each other, scaled at
         50% of the size of the symbol class



Sunday, February 22, 2009                                                          11
Button Creation in ActionScript


         Buttons can be made from either movie clips or button symbols stored
    ✤

         in the library

         As we have seen, an event listener:
    ✤

                     objectName.addEventListener(MouseEvent.CLICK, objectFunction);
         is then used to link a button to an action

         Lets take a look at MakingButtons.fla
    ✤




Sunday, February 22, 2009                                                             12
Simple Shapes in ActionScript


         It is possible to create simple
    ✤

         graphics entirely within
         ActionScript such as lines,
         rectangles, circles, and ellipses

         Closed shapes can also be filled
    ✤

         in

         Lets take a look at
    ✤

         DrawingShapes.fla



Sunday, February 22, 2009                    13
Using Sprites in ActionScript

         The Sprite class is a basic display list building block: a display list
    ✤

         node that can display graphics and can also contain children.

         A Sprite object is similar to a movie clip, but does not have a timeline.
    ✤

         Sprite is an appropriate base class for objects that do not require
         timelines. For example, Sprite would be a logical base class for user
         interface (UI) components that typically do not use the timeline.

         The Sprite class is new in ActionScript 3.0.
    ✤




         Lets take a look at CreatingSpriteGroups.fla
    ✤




Sunday, February 22, 2009                                                            14
Managing the Display List


         As we add objects to the display list, the last object added appears in
    ✤

         front of previously added objects

         We manage the position of “children” on the stage using
    ✤

         setChildIndex (first position is 0)

         Lets take a look at SettingSpriteDepth.fla
    ✤




Sunday, February 22, 2009                                                          15
User Input in ActionScript

         Mouse Input
    ✤


               Use event listener to track mouse movement and rollover
          ✤

               MouseInput.fla
         Keyboard Input
    ✤


               Use event listeners to detect key press (requires ASCII codes)
          ✤

               KeyboardInput.fla
         Text Input
    ✤


               Using AS to set input type, properties and actions
          ✤

               TextInput.fla


Sunday, February 22, 2009                                                       16
User Interaction in ActionScript


         Many games allow interaction with an object using the arrow keys
    ✤

         MovingSprites.fla

         Another common method of interaction is dragging an object using
    ✤

         the mouse. The example creates an instance of the Point() class to
         track movement.
         DraggingSprites.fla




Sunday, February 22, 2009                                                     17
Rosenzweig - Wrap-up

         Chapter 2 covers a lot things you can do with ActionScript for
    ✤

         creating games

         Be sure to review the additional sections:
    ✤




               Random numbers and Shuffling an Array
          ✤




               Accessing external data
          ✤




               Collision detection
          ✤




               Animation examples
          ✤




Sunday, February 22, 2009                                                 18
HOT - Components and Forms

         You can create a form in html that includes text entry fields, check
    ✤

         boxes, radio button, combo boxes, lists, etc. You can also set the tab
         order for the form elements to aid in usability. The contents of the
         form may then be submitted using either a form post method or by
         calling a script.

         Submitting form contents is generally via server-side script to tell
    ✤

         what to do with the form contents. Scripts may be in JavaScript, Perl,
         ASP.NET, Visual Basic, or other scripting languages.

         Flash allows the creation of Forms, creating rich-content user
    ✤

         applications using a set of pre-defined component classes which may
         be instantiated using the stage or through ActionScript.

Sunday, February 22, 2009                                                         19
HOT - Working with Components


         Chap 15 builds a form in Flash using the Flash UI Components in
    ✤

         ActionScript 3.0

         Components are accessed via the Components Panel and are
    ✤

         automatically added to the Library when they are dragged to the
         stage

         In the example, components are configured using the Properties/
    ✤

         Parameters panel, although this could also be done using the
         Component Properties panel or in ActionScript



Sunday, February 22, 2009                                                  20
HOT - Creating a Form



         Take a look at:
    ✤




               orderForm_Final.fla
          ✤




               orderForm.fla
          ✤




Sunday, February 22, 2009           21
Team Activity



         Begin working on storyboard
    ✤




         What role with prototypes play?
    ✤




         Finalize project plan
    ✤




Sunday, February 22, 2009                  22

More Related Content

Viewers also liked

Basic Game Frameworks
Basic Game FrameworksBasic Game Frameworks
Basic Game Frameworks
University of West Florida
 
Design Strategy
Design StrategyDesign Strategy
Ecml2010 Slides
Ecml2010 SlidesEcml2010 Slides
Ecml2010 Slides
fanizzi
 
Technology Applications in Education and Training
Technology Applications in Education and TrainingTechnology Applications in Education and Training
Technology Applications in Education and Training
University of West Florida
 
PLN4PD
PLN4PDPLN4PD
Listen Richard
Listen RichardListen Richard
Listen Richardwikirichi
 
Introduction to Games and Simulations
Introduction to Games and SimulationsIntroduction to Games and Simulations
Introduction to Games and Simulations
University of West Florida
 
Media literacy workshop
Media literacy workshopMedia literacy workshop
Media literacy workshop
University of West Florida
 
Kare Bins
Kare BinsKare Bins
Kare Bins
Laura Smith
 
#svjun26 South Vermillion Community Schools
#svjun26 South Vermillion Community Schools#svjun26 South Vermillion Community Schools
#svjun26 South Vermillion Community Schools
University of West Florida
 
Social Learning Part B
Social Learning Part BSocial Learning Part B
Social Learning Part B
University of West Florida
 
Eswc2009
Eswc2009Eswc2009
Eswc2009
fanizzi
 
Eswc2009
Eswc2009Eswc2009
Eswc2009
fanizzi
 
Digital Curation and Methods for Teaching Digital Literacy Skills
Digital Curation and Methods for Teaching Digital Literacy SkillsDigital Curation and Methods for Teaching Digital Literacy Skills
Digital Curation and Methods for Teaching Digital Literacy Skills
University of West Florida
 
Applying Game Concepts To Learning
Applying Game Concepts To LearningApplying Game Concepts To Learning
Applying Game Concepts To Learning
University of West Florida
 
Fanizzi Ilp2008 Dl Foil
Fanizzi Ilp2008 Dl FoilFanizzi Ilp2008 Dl Foil
Fanizzi Ilp2008 Dl Foil
fanizzi
 
Fanizzi Ilp2008 Kernel
Fanizzi Ilp2008 KernelFanizzi Ilp2008 Kernel
Fanizzi Ilp2008 Kernel
fanizzi
 
Bgp (1)
Bgp (1)Bgp (1)
Telecom Sourcing Accountibility
Telecom Sourcing AccountibilityTelecom Sourcing Accountibility
Telecom Sourcing Accountibility
Jeffrey Barnes
 
Tuna Pax
Tuna PaxTuna Pax
Tuna Pax
infotunamadrid
 

Viewers also liked (20)

Basic Game Frameworks
Basic Game FrameworksBasic Game Frameworks
Basic Game Frameworks
 
Design Strategy
Design StrategyDesign Strategy
Design Strategy
 
Ecml2010 Slides
Ecml2010 SlidesEcml2010 Slides
Ecml2010 Slides
 
Technology Applications in Education and Training
Technology Applications in Education and TrainingTechnology Applications in Education and Training
Technology Applications in Education and Training
 
PLN4PD
PLN4PDPLN4PD
PLN4PD
 
Listen Richard
Listen RichardListen Richard
Listen Richard
 
Introduction to Games and Simulations
Introduction to Games and SimulationsIntroduction to Games and Simulations
Introduction to Games and Simulations
 
Media literacy workshop
Media literacy workshopMedia literacy workshop
Media literacy workshop
 
Kare Bins
Kare BinsKare Bins
Kare Bins
 
#svjun26 South Vermillion Community Schools
#svjun26 South Vermillion Community Schools#svjun26 South Vermillion Community Schools
#svjun26 South Vermillion Community Schools
 
Social Learning Part B
Social Learning Part BSocial Learning Part B
Social Learning Part B
 
Eswc2009
Eswc2009Eswc2009
Eswc2009
 
Eswc2009
Eswc2009Eswc2009
Eswc2009
 
Digital Curation and Methods for Teaching Digital Literacy Skills
Digital Curation and Methods for Teaching Digital Literacy SkillsDigital Curation and Methods for Teaching Digital Literacy Skills
Digital Curation and Methods for Teaching Digital Literacy Skills
 
Applying Game Concepts To Learning
Applying Game Concepts To LearningApplying Game Concepts To Learning
Applying Game Concepts To Learning
 
Fanizzi Ilp2008 Dl Foil
Fanizzi Ilp2008 Dl FoilFanizzi Ilp2008 Dl Foil
Fanizzi Ilp2008 Dl Foil
 
Fanizzi Ilp2008 Kernel
Fanizzi Ilp2008 KernelFanizzi Ilp2008 Kernel
Fanizzi Ilp2008 Kernel
 
Bgp (1)
Bgp (1)Bgp (1)
Bgp (1)
 
Telecom Sourcing Accountibility
Telecom Sourcing AccountibilityTelecom Sourcing Accountibility
Telecom Sourcing Accountibility
 
Tuna Pax
Tuna PaxTuna Pax
Tuna Pax
 

Similar to Advanced Action Script

JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
Simon Willison
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Library
jeresig
 
ArchGenXML / UML and Plone
ArchGenXML / UML and PloneArchGenXML / UML and Plone
ArchGenXML / UML and Plone
Jazkarta, Inc.
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, traps
Florian Weil
 
Artdm 170 week15 publishing
Artdm 170 week15 publishingArtdm 170 week15 publishing
Artdm 170 week15 publishing
Gilbert Guerrero
 
MATE: A Flex Framework - "Extreme Makeover"
MATE: A Flex Framework - "Extreme Makeover"MATE: A Flex Framework - "Extreme Makeover"
MATE: A Flex Framework - "Extreme Makeover"
Theo Rushin Jr
 
Getting started with Verold and Three.js
Getting started with Verold and Three.jsGetting started with Verold and Three.js
Getting started with Verold and Three.js
Verold
 
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Paris Android User Group
 
Learning jQuery @ MIT
Learning jQuery @ MITLearning jQuery @ MIT
Learning jQuery @ MIT
jeresig
 
Advanced Ruby Scripting For Sketch Up
Advanced Ruby Scripting For Sketch UpAdvanced Ruby Scripting For Sketch Up
Advanced Ruby Scripting For Sketch Up
GoogleTecTalks
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for you
Simon Willison
 
SwiftUI - Performance and Memory Management
SwiftUI - Performance and Memory ManagementSwiftUI - Performance and Memory Management
SwiftUI - Performance and Memory Management
WannitaTolaema
 
Chris Wilson @ FOWA Feb 07
Chris Wilson @ FOWA Feb 07Chris Wilson @ FOWA Feb 07
Chris Wilson @ FOWA Feb 07
carsonsystems
 
2013-03-07 indie developer toolkit
2013-03-07 indie developer toolkit2013-03-07 indie developer toolkit
2013-03-07 indie developer toolkit
CocoaHeads Tricity
 
Silverlight: Designer and Developer Workflow
Silverlight: Designer and Developer WorkflowSilverlight: Designer and Developer Workflow
Silverlight: Designer and Developer Workflow
roberto.design
 
Artdm170 Week5 Intro To Flash
Artdm170 Week5 Intro To FlashArtdm170 Week5 Intro To Flash
Artdm170 Week5 Intro To Flash
Gilbert Guerrero
 
JS digest. Mid-Summer 2017
JS digest. Mid-Summer 2017JS digest. Mid-Summer 2017
JS digest. Mid-Summer 2017
ElifTech
 
Building an artist community website with ArchGenXML / Poseidon
Building an artist community website with ArchGenXML / PoseidonBuilding an artist community website with ArchGenXML / Poseidon
Building an artist community website with ArchGenXML / Poseidon
Jazkarta, Inc.
 
Silverlight 2 For Developers
Silverlight 2 For DevelopersSilverlight 2 For Developers
Silverlight 2 For Developers
Mithun T. Dhar
 
Windows phone and azure
Windows phone and azureWindows phone and azure
Windows phone and azure
★ Dovydas Navickas
 

Similar to Advanced Action Script (20)

JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Library
 
ArchGenXML / UML and Plone
ArchGenXML / UML and PloneArchGenXML / UML and Plone
ArchGenXML / UML and Plone
 
Moving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, trapsMoving from AS3 to Flex - advantages, hazards, traps
Moving from AS3 to Flex - advantages, hazards, traps
 
Artdm 170 week15 publishing
Artdm 170 week15 publishingArtdm 170 week15 publishing
Artdm 170 week15 publishing
 
MATE: A Flex Framework - "Extreme Makeover"
MATE: A Flex Framework - "Extreme Makeover"MATE: A Flex Framework - "Extreme Makeover"
MATE: A Flex Framework - "Extreme Makeover"
 
Getting started with Verold and Three.js
Getting started with Verold and Three.jsGetting started with Verold and Three.js
Getting started with Verold and Three.js
 
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
 
Learning jQuery @ MIT
Learning jQuery @ MITLearning jQuery @ MIT
Learning jQuery @ MIT
 
Advanced Ruby Scripting For Sketch Up
Advanced Ruby Scripting For Sketch UpAdvanced Ruby Scripting For Sketch Up
Advanced Ruby Scripting For Sketch Up
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for you
 
SwiftUI - Performance and Memory Management
SwiftUI - Performance and Memory ManagementSwiftUI - Performance and Memory Management
SwiftUI - Performance and Memory Management
 
Chris Wilson @ FOWA Feb 07
Chris Wilson @ FOWA Feb 07Chris Wilson @ FOWA Feb 07
Chris Wilson @ FOWA Feb 07
 
2013-03-07 indie developer toolkit
2013-03-07 indie developer toolkit2013-03-07 indie developer toolkit
2013-03-07 indie developer toolkit
 
Silverlight: Designer and Developer Workflow
Silverlight: Designer and Developer WorkflowSilverlight: Designer and Developer Workflow
Silverlight: Designer and Developer Workflow
 
Artdm170 Week5 Intro To Flash
Artdm170 Week5 Intro To FlashArtdm170 Week5 Intro To Flash
Artdm170 Week5 Intro To Flash
 
JS digest. Mid-Summer 2017
JS digest. Mid-Summer 2017JS digest. Mid-Summer 2017
JS digest. Mid-Summer 2017
 
Building an artist community website with ArchGenXML / Poseidon
Building an artist community website with ArchGenXML / PoseidonBuilding an artist community website with ArchGenXML / Poseidon
Building an artist community website with ArchGenXML / Poseidon
 
Silverlight 2 For Developers
Silverlight 2 For DevelopersSilverlight 2 For Developers
Silverlight 2 For Developers
 
Windows phone and azure
Windows phone and azureWindows phone and azure
Windows phone and azure
 

More from University of West Florida

Universities Without Borders
Universities Without BordersUniversities Without Borders
Universities Without Borders
University of West Florida
 
MOOCs: Fact vs. Myth
MOOCs: Fact vs. MythMOOCs: Fact vs. Myth
MOOCs: Fact vs. Myth
University of West Florida
 
Social Learning
Social LearningSocial Learning
Learning Verses Experience
Learning Verses ExperienceLearning Verses Experience
Learning Verses Experience
University of West Florida
 
Social Learning Part A
Social Learning Part ASocial Learning Part A
Social Learning Part A
University of West Florida
 
Social Communities
Social CommunitiesSocial Communities
Social Communities
University of West Florida
 
The Social Web
The Social WebThe Social Web
Trivia/Quiz Games
Trivia/Quiz GamesTrivia/Quiz Games
Trivia/Quiz Games
University of West Florida
 
Flash Word Games
Flash Word GamesFlash Word Games
Flash Word Games
University of West Florida
 
Time-based Animation Games
Time-based Animation GamesTime-based Animation Games
Time-based Animation Games
University of West Florida
 
Memory Deduction Games
Memory Deduction GamesMemory Deduction Games
Memory Deduction Games
University of West Florida
 
Learning Game Implementation
Learning Game ImplementationLearning Game Implementation
Learning Game Implementation
University of West Florida
 
Game Design Process
Game Design ProcessGame Design Process
Game Design Process
University of West Florida
 
Learning Verses Experience
Learning Verses ExperienceLearning Verses Experience
Learning Verses Experience
University of West Florida
 

More from University of West Florida (14)

Universities Without Borders
Universities Without BordersUniversities Without Borders
Universities Without Borders
 
MOOCs: Fact vs. Myth
MOOCs: Fact vs. MythMOOCs: Fact vs. Myth
MOOCs: Fact vs. Myth
 
Social Learning
Social LearningSocial Learning
Social Learning
 
Learning Verses Experience
Learning Verses ExperienceLearning Verses Experience
Learning Verses Experience
 
Social Learning Part A
Social Learning Part ASocial Learning Part A
Social Learning Part A
 
Social Communities
Social CommunitiesSocial Communities
Social Communities
 
The Social Web
The Social WebThe Social Web
The Social Web
 
Trivia/Quiz Games
Trivia/Quiz GamesTrivia/Quiz Games
Trivia/Quiz Games
 
Flash Word Games
Flash Word GamesFlash Word Games
Flash Word Games
 
Time-based Animation Games
Time-based Animation GamesTime-based Animation Games
Time-based Animation Games
 
Memory Deduction Games
Memory Deduction GamesMemory Deduction Games
Memory Deduction Games
 
Learning Game Implementation
Learning Game ImplementationLearning Game Implementation
Learning Game Implementation
 
Game Design Process
Game Design ProcessGame Design Process
Game Design Process
 
Learning Verses Experience
Learning Verses ExperienceLearning Verses Experience
Learning Verses Experience
 

Recently uploaded

Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
JomonJoseph58
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
IsmaelVazquez38
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
Prof. Dr. K. Adisesha
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
blueshagoo1
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 

Recently uploaded (20)

Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Data Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsxData Structure using C by Dr. K Adisesha .ppsx
Data Structure using C by Dr. K Adisesha .ppsx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 

Advanced Action Script

  • 1. Advanced ActionScript Concepts IT 7220 February 23, 2009 Sunday, February 22, 2009 1
  • 2. Agenda Syllabus Updates ✤ Game Assessment Papers ✤ Rosenzweig - ActionScript 3.0/Game Programming University ✤ Building Game Elements in ActionScript 3.0 ✤ HOT Lab - Flash Components and Forms ✤ Work in Project Teams ✤ Sunday, February 22, 2009 2
  • 3. Rosenzweig GP University Flash Game University (http://flashgameu.com/) ✤ Companion Website to Book ✤ Source code for all games referenced in text ✤ Video tutorials ✤ Blog ✤ Forums ✤ Sunday, February 22, 2009 3
  • 4. Rosenzweig Chap 1 Overview Review of Flash Interface ✤ ActionScript in timeline and using document class files ✤ Condition statements ✤ Loops - For, While, Do ✤ Use of Flash ActionScript Debugger ✤ Game Programming Checklist ✤ Sunday, February 22, 2009 4
  • 5. Simple ActionScript Program HelloWorld1.fla ✤ ActionScript in timeline, output using Trace Function ✤ Sunday, February 22, 2009 5
  • 6. Placing Objects on Stage HelloWorld2.fla ✤ Still working with ✤ ActionScript in the Timeline Create text field object ✤ Assign a value to it ✤ Place on stage (in display list) ✤ No text parameters for control ✤ Stage over placement or appearance (Display Object Container) of object Main Timeline (Display Object Container) TextField (Display Object) Sunday, February 22, 2009 6
  • 7. Document Class Library HelloWorld3.as ✤ All document classes are ✤ derived from either the MovieClip or Sprite class MovieClip class is a container ✤ class which includes the stage and timeline with each instance created This allows the text object to ✤ be added to the movie clip Document class must then be ✤ added to the Flash project file using the properties panel Sunday, February 22, 2009 7
  • 8. Rosenzweig Chap 2 Overview Creating and working with visual objects ✤ Player input ✤ Controlling animation with ActionScript ✤ Player Interaction via the Keyboard ✤ Accessing external data ✤ Arrays ✤ Sunday, February 22, 2009 8
  • 9. Visual Objects - Movie Clips We can add movie clips to our project by dragging them from the ✤ library to the stage, and then adjusting appearance using the properties panel It is also possible to add movie clips from the library solely with ✤ ActionScript, by setting the symbol linkage properties Lets take a look at the mascot movie clip in UsingMovieClips.fla ✤ The MC timeline has four layers to make it easier to change the ✤ animation a single part of the movie Sunday, February 22, 2009 9
  • 10. Create MC Objects - Flash Interface Drag as many instances of a movie clip symbol onto the stage as you ✤ want Position using select tool/properties ✤ Scale and rotate using free transform tool ✤ Sunday, February 22, 2009 10
  • 11. Create MC Objects - ActionScript First, we make the movie clip accessible to ActionScript by setting the ✤ Linkage properties (see Fig 2.2, p 43): enter Class name and select Export for ActionScript Next we use ActionScript to create a single instance on the stage at ✤ x=275, y=150, and rotating the movie clip 10º to the right Finally, using a For loop, we create 10 additional instances of the ✤ movie clip at y=300, spaced 150 pixels apart from each other, scaled at 50% of the size of the symbol class Sunday, February 22, 2009 11
  • 12. Button Creation in ActionScript Buttons can be made from either movie clips or button symbols stored ✤ in the library As we have seen, an event listener: ✤ objectName.addEventListener(MouseEvent.CLICK, objectFunction); is then used to link a button to an action Lets take a look at MakingButtons.fla ✤ Sunday, February 22, 2009 12
  • 13. Simple Shapes in ActionScript It is possible to create simple ✤ graphics entirely within ActionScript such as lines, rectangles, circles, and ellipses Closed shapes can also be filled ✤ in Lets take a look at ✤ DrawingShapes.fla Sunday, February 22, 2009 13
  • 14. Using Sprites in ActionScript The Sprite class is a basic display list building block: a display list ✤ node that can display graphics and can also contain children. A Sprite object is similar to a movie clip, but does not have a timeline. ✤ Sprite is an appropriate base class for objects that do not require timelines. For example, Sprite would be a logical base class for user interface (UI) components that typically do not use the timeline. The Sprite class is new in ActionScript 3.0. ✤ Lets take a look at CreatingSpriteGroups.fla ✤ Sunday, February 22, 2009 14
  • 15. Managing the Display List As we add objects to the display list, the last object added appears in ✤ front of previously added objects We manage the position of “children” on the stage using ✤ setChildIndex (first position is 0) Lets take a look at SettingSpriteDepth.fla ✤ Sunday, February 22, 2009 15
  • 16. User Input in ActionScript Mouse Input ✤ Use event listener to track mouse movement and rollover ✤ MouseInput.fla Keyboard Input ✤ Use event listeners to detect key press (requires ASCII codes) ✤ KeyboardInput.fla Text Input ✤ Using AS to set input type, properties and actions ✤ TextInput.fla Sunday, February 22, 2009 16
  • 17. User Interaction in ActionScript Many games allow interaction with an object using the arrow keys ✤ MovingSprites.fla Another common method of interaction is dragging an object using ✤ the mouse. The example creates an instance of the Point() class to track movement. DraggingSprites.fla Sunday, February 22, 2009 17
  • 18. Rosenzweig - Wrap-up Chapter 2 covers a lot things you can do with ActionScript for ✤ creating games Be sure to review the additional sections: ✤ Random numbers and Shuffling an Array ✤ Accessing external data ✤ Collision detection ✤ Animation examples ✤ Sunday, February 22, 2009 18
  • 19. HOT - Components and Forms You can create a form in html that includes text entry fields, check ✤ boxes, radio button, combo boxes, lists, etc. You can also set the tab order for the form elements to aid in usability. The contents of the form may then be submitted using either a form post method or by calling a script. Submitting form contents is generally via server-side script to tell ✤ what to do with the form contents. Scripts may be in JavaScript, Perl, ASP.NET, Visual Basic, or other scripting languages. Flash allows the creation of Forms, creating rich-content user ✤ applications using a set of pre-defined component classes which may be instantiated using the stage or through ActionScript. Sunday, February 22, 2009 19
  • 20. HOT - Working with Components Chap 15 builds a form in Flash using the Flash UI Components in ✤ ActionScript 3.0 Components are accessed via the Components Panel and are ✤ automatically added to the Library when they are dragged to the stage In the example, components are configured using the Properties/ ✤ Parameters panel, although this could also be done using the Component Properties panel or in ActionScript Sunday, February 22, 2009 20
  • 21. HOT - Creating a Form Take a look at: ✤ orderForm_Final.fla ✤ orderForm.fla ✤ Sunday, February 22, 2009 21
  • 22. Team Activity Begin working on storyboard ✤ What role with prototypes play? ✤ Finalize project plan ✤ Sunday, February 22, 2009 22