SlideShare a Scribd company logo
1 of 17
Download to read offline
FLASH WORD GAMES
                           IT 7220 - April 6, 2009




Sunday, April 5, 2009                                1
AGENDA

                  Syllabus updates

                  Project updates - presentations

                  Strings in Flash

                  Hangman Game

                  Word Search Game


Sunday, April 5, 2009                               2
SYLLABUS



                  Three weeks until presentations - April 27

                  Final Flash discussion next week -
                  Trivia and Quiz Games

                  No class meeting May 4 - Reflection Paper due




Sunday, April 5, 2009                                            3
PROJECTS

                  Fab C - Recycling Maze Game

                  Fantastic Four - Geography Game

                  Flash Sharks - “Let’s Play Math!” Game

                  Funky Flash - “Algebra: It’s an Everyday Thing” Quiz
                  Game

                  Worry Warts - Recycling Instructional Game


Sunday, April 5, 2009                                                    4
PRESENTATIONS APRIL 27

                  15-20 Minutes including time for questions

                        Professional pitch, rehearsed, ppt optional, demo

                  Deliverable will be a CD (no need for binder)

                        Flash, SWF, and related files

                        Project Documentation: Design Document; Project
                        Plan; prototype/storyboard; pilot report;
                        presentation materials

Sunday, April 5, 2009                                                       5
STRINGS IN FLASH

                  Think of a string as an array of characters
                  Strings are a very useful engagement design element
                  for creating cognitive challenge with verbal and visual
                  information (examples: word search; sodoku;
                  vocabulary development, etc.)
                  Flash provides a rich set of functions for managing
                  strings--summarized by Rosenzweig on p 302
                        charAt         join          slice       toLowerCase
                        charCodeAt     lastIndexOf   split       toUpperCase
                        concat         match         string
                        fromCharCode   replace       substr
                        indexOf        search        substring




Sunday, April 5, 2009                                                          6
TEXT FORMATTING

                  Text formatting may be applied by creating style
                  sheets or TextFormat objects in ActionScript

                  Style sheets are applied to HTML text whereas
                  TextFormat objects are used with text fields in Flash

                  Two methods are available for creating TextObjects:
                  Inline and formal

                  TextFormat objects are usually created just before a
                  TextField

Sunday, April 5, 2009                                                    7
FORMATTING TEXTOBJECTS




               Flash provides a set of properties for formatting
               text--summarized by Rosenzweig on p 304
                        align         font      leftMargin      target
                        blockIndent   indent    letterSpacing   underline
                        bold          italic    rightMargin     url
                        bullet        kerning   size
                        color         leading   tabStops




Sunday, April 5, 2009                                                       8
CREATING TEXTFIELD OBJECTS

                  Creating a TextField is similar to creating a Sprite
                        Both are display objects
                        Both can be added to other Sprites and Movie clips with addChild
                        var myTextField:TextField = new TextField();
                        addChild(myTextField);
                  Formats are assigned to text fields using two
                  methods:
                        defaultTextFormat - generally used with text fields in games
                        myTextField.defaultTextFormat = letterFormat;
                        setTextFormat - allows specification of start/end characters for
                        formatting
                        myTextField.setTextFormat(letterFormat);



Sunday, April 5, 2009                                                                      9
TEXTFIELD PROPERTIES

                  Flash provides a set of properties for managing text
                  fields--summarized by Rosenzweig on p 305-6
                        autoSize          defaultTextFormat   textColor
                        background        embedFonts          type
                        backgroundColor   multiline           wordWrap
                        border            selectable
                        borderColor       text


                  NOTE: to embed fonts in your project requires that you
                  first import the font using the library dropdown menu
                  and then set the lingag properties to export the font to
                  ActionScript (discussed on p 306 and in Ch 7)


Sunday, April 5, 2009                                                        10
ANIMATED TEXT EXAMPLE

                  Rosenzweig provides an animated text example to
                  demonstrate the string concepts discussed with a bit
                  of panache

                        TextFly.fla

                        TextFly.as

                  If you have extra time in your project, this code could
                  be reused to animate the title on your intro frame


Sunday, April 5, 2009                                                       11
HANGMAN GAME


                  ‘Relatively’ simple game, take on 19th century game
                  minus the gallows

                  Consists of guessing the letters to complete a phrase

                  Number of wrong answers tied to number of frames
                  of movie clip; although game play continues until user
                  quits the Flash app



Sunday, April 5, 2009                                                      12
HANGMAN GAME ELEMENTS



                  Single frame with one movie clip in the library

                  All game elements and logic stored in document class
                  library--Hangman.as




Sunday, April 5, 2009                                                    13
HANGMAN GAME MODS


                  Easily change phrase in AS file or randomly generate a
                  list of phrases using an array

                  Include an intro, game, and scoring screen to provide
                  setup and scoring

                  End game when number of tries exceeds number of
                  frames in movie clip



Sunday, April 5, 2009                                                     14
WORD SEARCH GAME


                  This game is obviously more complex, follows 3-
                  frame structure: intro; play; gameover

                  All game logic is in a single document class
                  WordSearch.as linked to WordSearch.fla

                  Searches are horizontal, vertical, and diaganol

                  Words are removed from list when located


Sunday, April 5, 2009                                               15
WORD SEARCH MODS


                  Easily modifiable to any subject, simply change the list
                  of words

                  Words could also be read from an external (XML) file
                  for even greater flexibility

                  Could add a timer

                  Grid size can be reduced for younger audiences


Sunday, April 5, 2009                                                       16
LAB




                  Work in teams




Sunday, April 5, 2009                   17

More Related Content

Viewers also liked

Mystery Picture
Mystery Picture Mystery Picture
Mystery Picture Mrs. Moore
 
English Vocabulary
English VocabularyEnglish Vocabulary
English Vocabularym nagaRAJU
 
Trisca vocabulary test
Trisca vocabulary testTrisca vocabulary test
Trisca vocabulary testtrisca
 
Three word games to eat up about 20 minutes
Three word games to eat up about 20 minutesThree word games to eat up about 20 minutes
Three word games to eat up about 20 minutesCodex 10168
 
Writing Vocabulary
Writing VocabularyWriting Vocabulary
Writing VocabularyLuchi Cuison
 
Games powerpoint hangman game
Games powerpoint hangman gameGames powerpoint hangman game
Games powerpoint hangman gameAissa djelil
 
Interactive PowerPoint : Hangman
Interactive PowerPoint : HangmanInteractive PowerPoint : Hangman
Interactive PowerPoint : HangmanEvette Sagim
 
Hướng dẫn thiết kế trò chơi HangMan
Hướng dẫn thiết kế trò chơi HangManHướng dẫn thiết kế trò chơi HangMan
Hướng dẫn thiết kế trò chơi HangManTuongVi94
 

Viewers also liked (14)

Mystery Picture
Mystery Picture Mystery Picture
Mystery Picture
 
English Vocabulary
English VocabularyEnglish Vocabulary
English Vocabulary
 
Word games 3
Word games 3Word games 3
Word games 3
 
Trisca vocabulary test
Trisca vocabulary testTrisca vocabulary test
Trisca vocabulary test
 
Hangman Game
Hangman GameHangman Game
Hangman Game
 
Three word games to eat up about 20 minutes
Three word games to eat up about 20 minutesThree word games to eat up about 20 minutes
Three word games to eat up about 20 minutes
 
Hangman Program
Hangman ProgramHangman Program
Hangman Program
 
Writing Vocabulary
Writing VocabularyWriting Vocabulary
Writing Vocabulary
 
Games powerpoint hangman game
Games powerpoint hangman gameGames powerpoint hangman game
Games powerpoint hangman game
 
Game hangman
Game hangmanGame hangman
Game hangman
 
Hangmanppt
HangmanpptHangmanppt
Hangmanppt
 
Interactive PowerPoint : Hangman
Interactive PowerPoint : HangmanInteractive PowerPoint : Hangman
Interactive PowerPoint : Hangman
 
Hướng dẫn thiết kế trò chơi HangMan
Hướng dẫn thiết kế trò chơi HangManHướng dẫn thiết kế trò chơi HangMan
Hướng dẫn thiết kế trò chơi HangMan
 
English ppt
English pptEnglish ppt
English ppt
 

Similar to Flash Word Games

Bay NET Aug 19 2009 presentation ppt
Bay  NET Aug 19 2009 presentation pptBay  NET Aug 19 2009 presentation ppt
Bay NET Aug 19 2009 presentation pptArt Scott
 
Natural language processing
Natural language processingNatural language processing
Natural language processingYanas Rajindran
 
FITC Android for Flashers
FITC Android for FlashersFITC Android for Flashers
FITC Android for Flashersweyert
 
Beyond The Web: Drupal Meets The Desktop (And Mobile)
Beyond The Web: Drupal Meets The Desktop (And Mobile)Beyond The Web: Drupal Meets The Desktop (And Mobile)
Beyond The Web: Drupal Meets The Desktop (And Mobile)Justin Miller
 
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...Stefan Marr
 

Similar to Flash Word Games (10)

The Type We Want
The Type We WantThe Type We Want
The Type We Want
 
Bay NET Aug 19 2009 presentation ppt
Bay  NET Aug 19 2009 presentation pptBay  NET Aug 19 2009 presentation ppt
Bay NET Aug 19 2009 presentation ppt
 
Trivia/Quiz Games
Trivia/Quiz GamesTrivia/Quiz Games
Trivia/Quiz Games
 
Natural language processing
Natural language processingNatural language processing
Natural language processing
 
Practical F#
Practical F#Practical F#
Practical F#
 
FITC Android for Flashers
FITC Android for FlashersFITC Android for Flashers
FITC Android for Flashers
 
Beyond The Web: Drupal Meets The Desktop (And Mobile)
Beyond The Web: Drupal Meets The Desktop (And Mobile)Beyond The Web: Drupal Meets The Desktop (And Mobile)
Beyond The Web: Drupal Meets The Desktop (And Mobile)
 
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...
 
Captivate
CaptivateCaptivate
Captivate
 
Shell scripting with f
Shell scripting with fShell scripting with f
Shell scripting with f
 

More from University of West Florida

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 SkillsUniversity of West Florida
 
Technology Applications in Education and Training
Technology Applications in Education and TrainingTechnology Applications in Education and Training
Technology Applications in Education and TrainingUniversity of West Florida
 

More from University of West Florida (20)

PLN4PD
PLN4PDPLN4PD
PLN4PD
 
Universities Without Borders
Universities Without BordersUniversities Without Borders
Universities Without Borders
 
Media literacy workshop
Media literacy workshopMedia literacy workshop
Media literacy workshop
 
#svjun26 South Vermillion Community Schools
#svjun26 South Vermillion Community Schools#svjun26 South Vermillion Community Schools
#svjun26 South Vermillion Community Schools
 
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
 
MOOCs: Fact vs. Myth
MOOCs: Fact vs. MythMOOCs: Fact vs. Myth
MOOCs: Fact vs. Myth
 
Introduction to Games and Simulations
Introduction to Games and SimulationsIntroduction to Games and Simulations
Introduction to Games and Simulations
 
Social Learning
Social LearningSocial Learning
Social Learning
 
Learning Verses Experience
Learning Verses ExperienceLearning Verses Experience
Learning Verses Experience
 
Technology Applications in Education and Training
Technology Applications in Education and TrainingTechnology Applications in Education and Training
Technology Applications in Education and Training
 
Social Learning Part B
Social Learning Part BSocial Learning Part B
Social Learning Part B
 
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
 
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
 
Basic Game Frameworks
Basic Game FrameworksBasic Game Frameworks
Basic Game Frameworks
 
Learning Game Implementation
Learning Game ImplementationLearning Game Implementation
Learning Game Implementation
 
Game Design Process
Game Design ProcessGame Design Process
Game Design Process
 

Recently uploaded

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 

Recently uploaded (20)

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 

Flash Word Games

  • 1. FLASH WORD GAMES IT 7220 - April 6, 2009 Sunday, April 5, 2009 1
  • 2. AGENDA Syllabus updates Project updates - presentations Strings in Flash Hangman Game Word Search Game Sunday, April 5, 2009 2
  • 3. SYLLABUS Three weeks until presentations - April 27 Final Flash discussion next week - Trivia and Quiz Games No class meeting May 4 - Reflection Paper due Sunday, April 5, 2009 3
  • 4. PROJECTS Fab C - Recycling Maze Game Fantastic Four - Geography Game Flash Sharks - “Let’s Play Math!” Game Funky Flash - “Algebra: It’s an Everyday Thing” Quiz Game Worry Warts - Recycling Instructional Game Sunday, April 5, 2009 4
  • 5. PRESENTATIONS APRIL 27 15-20 Minutes including time for questions Professional pitch, rehearsed, ppt optional, demo Deliverable will be a CD (no need for binder) Flash, SWF, and related files Project Documentation: Design Document; Project Plan; prototype/storyboard; pilot report; presentation materials Sunday, April 5, 2009 5
  • 6. STRINGS IN FLASH Think of a string as an array of characters Strings are a very useful engagement design element for creating cognitive challenge with verbal and visual information (examples: word search; sodoku; vocabulary development, etc.) Flash provides a rich set of functions for managing strings--summarized by Rosenzweig on p 302 charAt join slice toLowerCase charCodeAt lastIndexOf split toUpperCase concat match string fromCharCode replace substr indexOf search substring Sunday, April 5, 2009 6
  • 7. TEXT FORMATTING Text formatting may be applied by creating style sheets or TextFormat objects in ActionScript Style sheets are applied to HTML text whereas TextFormat objects are used with text fields in Flash Two methods are available for creating TextObjects: Inline and formal TextFormat objects are usually created just before a TextField Sunday, April 5, 2009 7
  • 8. FORMATTING TEXTOBJECTS Flash provides a set of properties for formatting text--summarized by Rosenzweig on p 304 align font leftMargin target blockIndent indent letterSpacing underline bold italic rightMargin url bullet kerning size color leading tabStops Sunday, April 5, 2009 8
  • 9. CREATING TEXTFIELD OBJECTS Creating a TextField is similar to creating a Sprite Both are display objects Both can be added to other Sprites and Movie clips with addChild var myTextField:TextField = new TextField(); addChild(myTextField); Formats are assigned to text fields using two methods: defaultTextFormat - generally used with text fields in games myTextField.defaultTextFormat = letterFormat; setTextFormat - allows specification of start/end characters for formatting myTextField.setTextFormat(letterFormat); Sunday, April 5, 2009 9
  • 10. TEXTFIELD PROPERTIES Flash provides a set of properties for managing text fields--summarized by Rosenzweig on p 305-6 autoSize defaultTextFormat textColor background embedFonts type backgroundColor multiline wordWrap border selectable borderColor text NOTE: to embed fonts in your project requires that you first import the font using the library dropdown menu and then set the lingag properties to export the font to ActionScript (discussed on p 306 and in Ch 7) Sunday, April 5, 2009 10
  • 11. ANIMATED TEXT EXAMPLE Rosenzweig provides an animated text example to demonstrate the string concepts discussed with a bit of panache TextFly.fla TextFly.as If you have extra time in your project, this code could be reused to animate the title on your intro frame Sunday, April 5, 2009 11
  • 12. HANGMAN GAME ‘Relatively’ simple game, take on 19th century game minus the gallows Consists of guessing the letters to complete a phrase Number of wrong answers tied to number of frames of movie clip; although game play continues until user quits the Flash app Sunday, April 5, 2009 12
  • 13. HANGMAN GAME ELEMENTS Single frame with one movie clip in the library All game elements and logic stored in document class library--Hangman.as Sunday, April 5, 2009 13
  • 14. HANGMAN GAME MODS Easily change phrase in AS file or randomly generate a list of phrases using an array Include an intro, game, and scoring screen to provide setup and scoring End game when number of tries exceeds number of frames in movie clip Sunday, April 5, 2009 14
  • 15. WORD SEARCH GAME This game is obviously more complex, follows 3- frame structure: intro; play; gameover All game logic is in a single document class WordSearch.as linked to WordSearch.fla Searches are horizontal, vertical, and diaganol Words are removed from list when located Sunday, April 5, 2009 15
  • 16. WORD SEARCH MODS Easily modifiable to any subject, simply change the list of words Words could also be read from an external (XML) file for even greater flexibility Could add a timer Grid size can be reduced for younger audiences Sunday, April 5, 2009 16
  • 17. LAB Work in teams Sunday, April 5, 2009 17