SlideShare a Scribd company logo
Computer Animation with Flash CS3 & ActionScript 3.0 National Polytechnic Institute of Cambodia Bachelor of IT, Year III, Semester 1 2007-2008 by Oum Saokosal, Head of IT Department
Other Notes Computer Animation with Flash CS3 & ActionScript 3.0
Other Notes Full Screen Add TextField  Apply Filter  Timer
Full Screen To set the display to full screen: stage.displayState = StageDisplayState.FULL_SCREEN; StageDisplayState: StageDisplayState.FULL_SCREEN StageDisplayState.NORMAL Note To display it, you have to run SWF file. If you want to embed this swf to website, you cannot use this statement, otherwise message error.
Add  TextField  (1) To add a text to stage, you can do one of the following: Add a dynamic text field manually Write codes Dynamic Text Field Add a text field to stage Change from static text to dynamic text Give an instance name to it Then you can use it in AS
Add  TextField  (2) 2. CODE: To add a text to display something: var tf1:TextField = new TextField(); tf1.text = "Hello"; tf1.autoSize = TextFieldAutoSize.LEFT; To add format to text: var format:TextFormat = new TextFormat(); format.font = "Verdana"; format.size = 20; format.color = 0xFF0000; tf1.setTextFormat(format); addChild(tf1);
Apply Filter To add Filter to textfield or movieClip: var tf:TextField = new TextField(); tf.text = "Hello"; tf.autoSize = TextFieldAutoSize.LEFT; //var filter1 = new DropShadowFilter(); var filter2 = new GradientGlowFilter(); var allFilters:Array = new Array(); allFilters.push(new DropShadowFilter()); allFilters.push(filter2); tf.filters = allFilters; addChild(tf);
Timer To set any actions performed according to time, use  Timer  class: var txtTime:TextField = new TextField(); txtTime.text = "0"; txtTime.autoSize = TextFieldAutoSize.LEFT; addChild(txtTime); var secondTimer:Timer = new Timer(1000); secondTimer.addEventListener(TimerEvent.TIMER, onTick); secondTimer.start(); var counter:int=0; function onTick(e:TimerEvent):void{ counter ++; txtTime.text = "" + counter; }

More Related Content

Viewers also liked (19)

How to create a simple image gallery in flash cs5
How to create a simple image gallery in flash cs5
Boy Jeorge
 
Actionscript 3 - Session 3 Action Script And Flash
Actionscript 3 - Session 3 Action Script And Flash
OUM SAOKOSAL
 
Actionscript 3 - Session 1 Introduction To As 3
Actionscript 3 - Session 1 Introduction To As 3
OUM SAOKOSAL
 
Action Script
Action Script
Angelin R
 
Measuring And Defining The Experience Of Immersion In Games
Measuring And Defining The Experience Of Immersion In Games
OUM SAOKOSAL
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
Saurabh Narula
 
ITS (Intelligent Teleportation System)
ITS (Intelligent Teleportation System)
OUM SAOKOSAL
 
Chapter 7 String
Chapter 7 String
OUM SAOKOSAL
 
Terminology In Telecommunication
Terminology In Telecommunication
OUM SAOKOSAL
 
Tutorial 1
Tutorial 1
Bible Tang
 
Kimchi Questionnaire
Kimchi Questionnaire
OUM SAOKOSAL
 
Rayleigh Fading Channel In Mobile Digital Communication System
Rayleigh Fading Channel In Mobile Digital Communication System
OUM SAOKOSAL
 
Java OOP Programming language (Part 7) - Swing
Java OOP Programming language (Part 7) - Swing
OUM SAOKOSAL
 
Java OOP Programming language (Part 4) - Collection
Java OOP Programming language (Part 4) - Collection
OUM SAOKOSAL
 
Java OOP Programming language (Part 5) - Inheritance
Java OOP Programming language (Part 5) - Inheritance
OUM SAOKOSAL
 
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
OUM SAOKOSAL
 
Java OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBC
OUM SAOKOSAL
 
Java OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & Interface
OUM SAOKOSAL
 
Android app development - Java Programming for Android
Android app development - Java Programming for Android
OUM SAOKOSAL
 
How to create a simple image gallery in flash cs5
How to create a simple image gallery in flash cs5
Boy Jeorge
 
Actionscript 3 - Session 3 Action Script And Flash
Actionscript 3 - Session 3 Action Script And Flash
OUM SAOKOSAL
 
Actionscript 3 - Session 1 Introduction To As 3
Actionscript 3 - Session 1 Introduction To As 3
OUM SAOKOSAL
 
Action Script
Action Script
Angelin R
 
Measuring And Defining The Experience Of Immersion In Games
Measuring And Defining The Experience Of Immersion In Games
OUM SAOKOSAL
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
Saurabh Narula
 
ITS (Intelligent Teleportation System)
ITS (Intelligent Teleportation System)
OUM SAOKOSAL
 
Terminology In Telecommunication
Terminology In Telecommunication
OUM SAOKOSAL
 
Kimchi Questionnaire
Kimchi Questionnaire
OUM SAOKOSAL
 
Rayleigh Fading Channel In Mobile Digital Communication System
Rayleigh Fading Channel In Mobile Digital Communication System
OUM SAOKOSAL
 
Java OOP Programming language (Part 7) - Swing
Java OOP Programming language (Part 7) - Swing
OUM SAOKOSAL
 
Java OOP Programming language (Part 4) - Collection
Java OOP Programming language (Part 4) - Collection
OUM SAOKOSAL
 
Java OOP Programming language (Part 5) - Inheritance
Java OOP Programming language (Part 5) - Inheritance
OUM SAOKOSAL
 
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
OUM SAOKOSAL
 
Java OOP Programming language (Part 8) - Java Database JDBC
Java OOP Programming language (Part 8) - Java Database JDBC
OUM SAOKOSAL
 
Java OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & Interface
OUM SAOKOSAL
 
Android app development - Java Programming for Android
Android app development - Java Programming for Android
OUM SAOKOSAL
 

Similar to Actionscript 3 - Session 7 Other Note (20)

Gd - 8th - Web Game Design Using Flash
Gd - 8th - Web Game Design Using Flash
Hadziq Fabroyir
 
ARTDM 170, Week 5: Intro To Flash
ARTDM 170, Week 5: Intro To Flash
Gilbert Guerrero
 
Advanced Action Script
Advanced Action Script
University of West Florida
 
Coding Flash : ActionScript(3.0) Tutorial
Coding Flash : ActionScript(3.0) Tutorial
PEI-YAO HUNG
 
Apps in a Flash HCI
Apps in a Flash HCI
Jonathan Goldman
 
ART149_tut_5
ART149_tut_5
Márcio Antônio Moraes Reyes
 
Flash 101
Flash 101
Stanley Fok
 
Artdm170 Week5 Intro To Flash
Artdm170 Week5 Intro To Flash
Gilbert Guerrero
 
Flashworkshop 090317231102-phpapp01
Flashworkshop 090317231102-phpapp01
momayabhavana
 
Flashworkshop 090317231102-phpapp01
Flashworkshop 090317231102-phpapp01
bhavanalm
 
Techno flash workbook session 1
Techno flash workbook session 1
maestradeagape
 
Concurrent Programming with ActionScript workers
Concurrent Programming with ActionScript workers
Paul Robertson
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 
Artdm170 week6 scripting_motion
Artdm170 week6 scripting_motion
Gilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 
Action script
Action script
Francisco Javier Arce Anguiano
 
Less Verbose ActionScript 3.0 - Write less and do more!
Less Verbose ActionScript 3.0 - Write less and do more!
Arul Kumaran
 
Introduction to Flash
Introduction to Flash
Izatul Akma
 
Gd - 8th - Web Game Design Using Flash
Gd - 8th - Web Game Design Using Flash
Hadziq Fabroyir
 
ARTDM 170, Week 5: Intro To Flash
ARTDM 170, Week 5: Intro To Flash
Gilbert Guerrero
 
Coding Flash : ActionScript(3.0) Tutorial
Coding Flash : ActionScript(3.0) Tutorial
PEI-YAO HUNG
 
Artdm170 Week5 Intro To Flash
Artdm170 Week5 Intro To Flash
Gilbert Guerrero
 
Flashworkshop 090317231102-phpapp01
Flashworkshop 090317231102-phpapp01
momayabhavana
 
Flashworkshop 090317231102-phpapp01
Flashworkshop 090317231102-phpapp01
bhavanalm
 
Techno flash workbook session 1
Techno flash workbook session 1
maestradeagape
 
Concurrent Programming with ActionScript workers
Concurrent Programming with ActionScript workers
Paul Robertson
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 
Artdm170 week6 scripting_motion
Artdm170 week6 scripting_motion
Gilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
Gilbert Guerrero
 
Less Verbose ActionScript 3.0 - Write less and do more!
Less Verbose ActionScript 3.0 - Write less and do more!
Arul Kumaran
 
Introduction to Flash
Introduction to Flash
Izatul Akma
 
Ad

More from OUM SAOKOSAL (16)

Class Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum Saokosal
OUM SAOKOSAL
 
Java OOP Programming language (Part 3) - Class and Object
Java OOP Programming language (Part 3) - Class and Object
OUM SAOKOSAL
 
Java OOP Programming language (Part 1) - Introduction to Java
Java OOP Programming language (Part 1) - Introduction to Java
OUM SAOKOSAL
 
Aggregate rank bringing order to web sites
Aggregate rank bringing order to web sites
OUM SAOKOSAL
 
How to succeed in graduate school
How to succeed in graduate school
OUM SAOKOSAL
 
Google
Google
OUM SAOKOSAL
 
E miner
E miner
OUM SAOKOSAL
 
Data preparation for mining world wide web browsing patterns (1999)
Data preparation for mining world wide web browsing patterns (1999)
OUM SAOKOSAL
 
Consumer acceptance of online banking an extension of the technology accepta...
Consumer acceptance of online banking an extension of the technology accepta...
OUM SAOKOSAL
 
When Do People Help
When Do People Help
OUM SAOKOSAL
 
Mc Nemar
Mc Nemar
OUM SAOKOSAL
 
Correlation Example
Correlation Example
OUM SAOKOSAL
 
Sem Ski Amos
Sem Ski Amos
OUM SAOKOSAL
 
Sem+Essentials
Sem+Essentials
OUM SAOKOSAL
 
Path Spss Amos (1)
Path Spss Amos (1)
OUM SAOKOSAL
 
How To Succeed In Graduate School
How To Succeed In Graduate School
OUM SAOKOSAL
 
Class Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum Saokosal
OUM SAOKOSAL
 
Java OOP Programming language (Part 3) - Class and Object
Java OOP Programming language (Part 3) - Class and Object
OUM SAOKOSAL
 
Java OOP Programming language (Part 1) - Introduction to Java
Java OOP Programming language (Part 1) - Introduction to Java
OUM SAOKOSAL
 
Aggregate rank bringing order to web sites
Aggregate rank bringing order to web sites
OUM SAOKOSAL
 
How to succeed in graduate school
How to succeed in graduate school
OUM SAOKOSAL
 
Data preparation for mining world wide web browsing patterns (1999)
Data preparation for mining world wide web browsing patterns (1999)
OUM SAOKOSAL
 
Consumer acceptance of online banking an extension of the technology accepta...
Consumer acceptance of online banking an extension of the technology accepta...
OUM SAOKOSAL
 
When Do People Help
When Do People Help
OUM SAOKOSAL
 
Correlation Example
Correlation Example
OUM SAOKOSAL
 
Path Spss Amos (1)
Path Spss Amos (1)
OUM SAOKOSAL
 
How To Succeed In Graduate School
How To Succeed In Graduate School
OUM SAOKOSAL
 
Ad

Recently uploaded (20)

Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 

Actionscript 3 - Session 7 Other Note

  • 1. Computer Animation with Flash CS3 & ActionScript 3.0 National Polytechnic Institute of Cambodia Bachelor of IT, Year III, Semester 1 2007-2008 by Oum Saokosal, Head of IT Department
  • 2. Other Notes Computer Animation with Flash CS3 & ActionScript 3.0
  • 3. Other Notes Full Screen Add TextField Apply Filter Timer
  • 4. Full Screen To set the display to full screen: stage.displayState = StageDisplayState.FULL_SCREEN; StageDisplayState: StageDisplayState.FULL_SCREEN StageDisplayState.NORMAL Note To display it, you have to run SWF file. If you want to embed this swf to website, you cannot use this statement, otherwise message error.
  • 5. Add TextField (1) To add a text to stage, you can do one of the following: Add a dynamic text field manually Write codes Dynamic Text Field Add a text field to stage Change from static text to dynamic text Give an instance name to it Then you can use it in AS
  • 6. Add TextField (2) 2. CODE: To add a text to display something: var tf1:TextField = new TextField(); tf1.text = "Hello"; tf1.autoSize = TextFieldAutoSize.LEFT; To add format to text: var format:TextFormat = new TextFormat(); format.font = "Verdana"; format.size = 20; format.color = 0xFF0000; tf1.setTextFormat(format); addChild(tf1);
  • 7. Apply Filter To add Filter to textfield or movieClip: var tf:TextField = new TextField(); tf.text = "Hello"; tf.autoSize = TextFieldAutoSize.LEFT; //var filter1 = new DropShadowFilter(); var filter2 = new GradientGlowFilter(); var allFilters:Array = new Array(); allFilters.push(new DropShadowFilter()); allFilters.push(filter2); tf.filters = allFilters; addChild(tf);
  • 8. Timer To set any actions performed according to time, use Timer class: var txtTime:TextField = new TextField(); txtTime.text = "0"; txtTime.autoSize = TextFieldAutoSize.LEFT; addChild(txtTime); var secondTimer:Timer = new Timer(1000); secondTimer.addEventListener(TimerEvent.TIMER, onTick); secondTimer.start(); var counter:int=0; function onTick(e:TimerEvent):void{ counter ++; txtTime.text = "" + counter; }