ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Flash Sharing Lesson 2Flash Development GuideBy Stanley Fok
We will talk about¡­Flash Development Environment SetupFlash Programming ModelOOP in FlashFlash Programming Best Practice
Flash Development Environment Setup
FlashDevelopA famous open source ActionScript EditorUseful Features Include: Code hintsCode completionCode generationCode searchingFeature Tour: http://www.flashdevelop.org/wikidocs/index.php?title=Features:Interface
FlashTracerFlash tracer is a firefox extension which enables you to see all the output generated by any running flash swf movies in browserDownload:http://www.sephiroth.it/firefox/flashtracer/
FlashTracer ConfigurationInstall Flash Debug Playerhttp://www.adobe.com/support/flashplayer/downloads.htmlflashlog.txt pathWindows XP: C:\Documents and Settings\{user}\Application Data\Macromedia\Flash Player\Logs\flashlog.txtWindows Vista: C:\Users\{user}\AppData\Roaming\Macromedia\Flash Player\Logs\flashlog.txtLinux: home/username/.macromedia/Flash_Player/Logs/flashlog.txtOSX: /Users/{username}/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt
Firebug & HttpWatchUseful to trace Request and Response between Flash Movie and ServerFirebug (only Firefox): http://getfirebug.com/HttpWatch (IE and Firefox): http://www.httpwatch.com/
Flash Programming Model
Program Entry PointFlash is an event-driven programNo specific program entry pointUnlike java / C, there is no ¡°main function¡± as the entry point and main loopCode logic is usually triggered by:Event handlerTimelineUI Class constructor
Application ArchitectureCode LogicActionScriptUI DefinitionFLA fileServer ResponseXML / JSONControllerModelView
Class StructureFlash Display ComponentsMovieClip, Sprit, ¡­Other Flash Core LibrariesAS3 Core LibrariesExtendsImports / ExtendsUI ClassesHelper ClassesData ClassesApplication Libraries
UI ClassTell the UI how to ¡°react¡± with different eventsUI ClassConstructorthis.addEventListener(MouseEvent.Click, this. handleMouseClick);Event Handlersprivate function handleMouseClick(¡­) {}UI Class Pattern
Helper ClassImplements reusable methods / business logic which can be shared within the application / across projects, e.g.String OperationServer CommunicationSound ManagerUsually implemented as static class
Data ClassTo define the variables and methods of a data object, e.g.A user has attributes:namegenderphotoPathAnd methods:save();logOut();
OOP in Flash
Comparing AS3.0 and Javahttp://flexblog.faratasystems.com/?p=115
Demo TimeCreating Our First OOP Flash Application
Steps to FollowFlashDevelop SetupFlash Movie SetupDefine UI TreeWrite the ClassesLink the Classes with UICompile!
The UI and Class Structure in this demoStageiconWheelMcClass: IconWheelinfoMciconContainerMcClass: IconContainerDynamic attachcoverMciconMciconMcClass: IconiconMc
Flash Programming Best PracticeRules to speed up development
Flash¡¯s Common ProblemsNo standard programming framework Long compile timeLong debug timeInvolves many people within the projectFrequently changing requirement from client
Rule #1Extract platform dependent config into XML files
Aim: Make application more portablePlatform Dependent Variables, such ashost name, API URLshould not be hardcoded inside ActionScriptThe Flash Application should be able to port onto any platform without compilation
Rule #2Identify and extract frequently changing variables to XML
Aim: Speed up debugging timeFrequently changing variables:Visual effect parametersWarning messagesCompilation is not needed during testProvide room for designer to adjust visual effect without editing ActionScript
Rule #3ActionScript should be extracted out from .FLA files and write into .AS files
Aim: To let programmer and designer work in parallelIn the timeline of FLA, only allow:Timeline control function,play(), stop(), gotoAndPlay(), etcTriggering functions defined in .AS files
Rule #4Ensure Flash App is able to run in Flash IDE already / in local drive
Aim: Speed up debugging timeDo not need to copy the complied .SWF files to server and reload browser to debug every timeCan be achieve by:Not using relative path for API or other assets:Do: http://www.abc.com/php/getData.phpDo not: /php/getData.php
Flash Player ¡°Global Security Setting¡±Allow the application access data from other domain when testing in local drive http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
Rule #5Ensure subsections SWF able to run independently
Aim: Speed up debugging timeMore concentrate on debugging a Flash sectionHomeSection 1Section 2Section 1aDebug entry point
Rule #6Plan well the UI structure before development
Aim: Leave room for designer to add timeline effectMake UI Class independent of UI structureStageiconWheelMcStageinfoMciconContainerMccoverMcinfoMciconContainerMccoverMcNot modulizedModulized
Rule #7Avoid using parent, root
Aim: Make UI Code independent of UI structureUI Structure will be usually changed during integration phaseWhen the Flash become very complex, you will see horrible code like:parent.parent.parent.parent¡­ Please avoid it!!!Avoid traversing the UI tree when accessing objects in other .SWF fileTry singleton or global variable (by static class variable)
The ¡°Root¡± reference issueIf start from home.swf ¡­In AS 2.0¡­home.swfRootIf start from section1a.swf ¡­section1a.swfsection1.swfsection2.swfRootsection1a.swf
The ¡°Root¡± reference issueIf start from home.swf ¡­In AS 3.0¡­home.swfStageRootIf start from section1a.swf ¡­section1a.swfRootsection1.swfsection2.swfStageRootRootsection1a.swfRoot
What¡¯s coming¡­Visual Effect Programming Skills

More Related Content

What's hot (20)

Joomla 15 Quickstart
Joomla 15 QuickstartJoomla 15 Quickstart
Joomla 15 Quickstart
AmyStephen
?
Modules and Components Introduction in Joomla! 2.5
Modules and Components Introduction in Joomla! 2.5Modules and Components Introduction in Joomla! 2.5
Modules and Components Introduction in Joomla! 2.5
Vishwash Gaur
?
Social website
Social websiteSocial website
Social website
Saqib Iqbal
?
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
Elsner Technologies Pvt Ltd
?
Installing Extensions in Joomla! 2.5
Installing Extensions in Joomla! 2.5Installing Extensions in Joomla! 2.5
Installing Extensions in Joomla! 2.5
Vishwash Gaur
?
Joomla CMS SEMINAR PPT
Joomla CMS SEMINAR PPTJoomla CMS SEMINAR PPT
Joomla CMS SEMINAR PPT
Pinky Mondal
?
Joomla Platform, por David Hurley
Joomla Platform, por David HurleyJoomla Platform, por David Hurley
Joomla Platform, por David Hurley
Grupo de Usuarios de Joomla! Guatemala
?
Joomla Day1
Joomla  Day1Joomla  Day1
Joomla Day1
Phusit Konsurin
?
Advantages And Disadvantages Of Joomla
Advantages And Disadvantages Of JoomlaAdvantages And Disadvantages Of Joomla
Advantages And Disadvantages Of Joomla
tradocaj
?
The Business of Microsoft Silverlight
The Business of Microsoft SilverlightThe Business of Microsoft Silverlight
The Business of Microsoft Silverlight
goodfriday
?
Selenium - automated browser-based testing -
Selenium - automated browser-based testing -Selenium - automated browser-based testing -
Selenium - automated browser-based testing -
Seiji KOMATSU
?
Joomla Introduction & Installation Tutorial
Joomla Introduction & Installation TutorialJoomla Introduction & Installation Tutorial
Joomla Introduction & Installation Tutorial
Singsys Pte Ltd
?
Basics of Joomla!
Basics of Joomla! Basics of Joomla!
Basics of Joomla!
Saurabh Shah
?
PHPBootCamp - Joomla! Framework
PHPBootCamp - Joomla! FrameworkPHPBootCamp - Joomla! Framework
PHPBootCamp - Joomla! Framework
Johan Janssens
?
Getting Started with the Joomla! Framework
Getting Started with the Joomla! FrameworkGetting Started with the Joomla! Framework
Getting Started with the Joomla! Framework
Michael Babker
?
Introduction to Joomla
Introduction to JoomlaIntroduction to Joomla
Introduction to Joomla
Asif Islam
?
ASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour TechnolabASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour Technolab
iFour Technolab Pvt. Ltd.
?
CMS Joomla
CMS JoomlaCMS Joomla
CMS Joomla
The eCore Group
?
State of play for Joomla - Nov 2014
State of play for Joomla - Nov 2014State of play for Joomla - Nov 2014
State of play for Joomla - Nov 2014
Tim Plummer
?
Cambodia Open Source Essential Training
Cambodia Open Source Essential TrainingCambodia Open Source Essential Training
Cambodia Open Source Essential Training
Samdy Lonh
?
Joomla 15 Quickstart
Joomla 15 QuickstartJoomla 15 Quickstart
Joomla 15 Quickstart
AmyStephen
?
Modules and Components Introduction in Joomla! 2.5
Modules and Components Introduction in Joomla! 2.5Modules and Components Introduction in Joomla! 2.5
Modules and Components Introduction in Joomla! 2.5
Vishwash Gaur
?
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
PHP Frameworks That Will Woo-Trick Your Web Application Development in 2019
Elsner Technologies Pvt Ltd
?
Installing Extensions in Joomla! 2.5
Installing Extensions in Joomla! 2.5Installing Extensions in Joomla! 2.5
Installing Extensions in Joomla! 2.5
Vishwash Gaur
?
Joomla CMS SEMINAR PPT
Joomla CMS SEMINAR PPTJoomla CMS SEMINAR PPT
Joomla CMS SEMINAR PPT
Pinky Mondal
?
Advantages And Disadvantages Of Joomla
Advantages And Disadvantages Of JoomlaAdvantages And Disadvantages Of Joomla
Advantages And Disadvantages Of Joomla
tradocaj
?
The Business of Microsoft Silverlight
The Business of Microsoft SilverlightThe Business of Microsoft Silverlight
The Business of Microsoft Silverlight
goodfriday
?
Selenium - automated browser-based testing -
Selenium - automated browser-based testing -Selenium - automated browser-based testing -
Selenium - automated browser-based testing -
Seiji KOMATSU
?
Joomla Introduction & Installation Tutorial
Joomla Introduction & Installation TutorialJoomla Introduction & Installation Tutorial
Joomla Introduction & Installation Tutorial
Singsys Pte Ltd
?
PHPBootCamp - Joomla! Framework
PHPBootCamp - Joomla! FrameworkPHPBootCamp - Joomla! Framework
PHPBootCamp - Joomla! Framework
Johan Janssens
?
Getting Started with the Joomla! Framework
Getting Started with the Joomla! FrameworkGetting Started with the Joomla! Framework
Getting Started with the Joomla! Framework
Michael Babker
?
Introduction to Joomla
Introduction to JoomlaIntroduction to Joomla
Introduction to Joomla
Asif Islam
?
ASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour TechnolabASP Dot Net Software Development in India - iFour Technolab
ASP Dot Net Software Development in India - iFour Technolab
iFour Technolab Pvt. Ltd.
?
State of play for Joomla - Nov 2014
State of play for Joomla - Nov 2014State of play for Joomla - Nov 2014
State of play for Joomla - Nov 2014
Tim Plummer
?
Cambodia Open Source Essential Training
Cambodia Open Source Essential TrainingCambodia Open Source Essential Training
Cambodia Open Source Essential Training
Samdy Lonh
?

Similar to Flash Development Guide (20)

Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)
dcoletta
?
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
dcoletta
?
A R T D M171 Week14 Multimedia
A R T D M171  Week14  MultimediaA R T D M171  Week14  Multimedia
A R T D M171 Week14 Multimedia
Gilbert Guerrero
?
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Teamstudio
?
Php Web Frameworks
Php Web FrameworksPhp Web Frameworks
Php Web Frameworks
Shreyans Jasoriya
?
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerPhp Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant Killer
Jackson F. de A. Mafra
?
Flex Introduction
Flex Introduction Flex Introduction
Flex Introduction
senthil0809
?
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Frank La Vigne
?
Afik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex IntroAfik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex Intro
Alphageeks
?
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
Troy Miles
?
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
Bala Subra
?
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
Bala Subra
?
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
vstorm83
?
Using FlexUnit 4 with Flash CS5
Using FlexUnit 4 with Flash CS5Using FlexUnit 4 with Flash CS5
Using FlexUnit 4 with Flash CS5
Ben Schmidtke III
?
Developing multi-screen applications using Adobe Integrated Runtime (AIR)
Developing multi-screen applications using Adobe Integrated Runtime (AIR)Developing multi-screen applications using Adobe Integrated Runtime (AIR)
Developing multi-screen applications using Adobe Integrated Runtime (AIR)
Sujit Reddy G
?
How and Why to extend Firefox
How and Why to extend FirefoxHow and Why to extend Firefox
How and Why to extend Firefox
Graham King
?
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
Francois Zaninotto
?
Flash-based audio and video communication
Flash-based audio and video communicationFlash-based audio and video communication
Flash-based audio and video communication
Kundan Singh
?
Benefits of the CodeIgniter Framework
Benefits of the CodeIgniter FrameworkBenefits of the CodeIgniter Framework
Benefits of the CodeIgniter Framework
Toby Beresford
?
Php Presentation
Php PresentationPhp Presentation
Php Presentation
Manish Bothra
?
Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)Building Buzzword (Flex Camp Boston 2007)
Building Buzzword (Flex Camp Boston 2007)
dcoletta
?
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
dcoletta
?
A R T D M171 Week14 Multimedia
A R T D M171  Week14  MultimediaA R T D M171  Week14  Multimedia
A R T D M171 Week14 Multimedia
Gilbert Guerrero
?
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Teamstudio
?
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerPhp Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant Killer
Jackson F. de A. Mafra
?
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with SilverlightRe-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Re-use Your Skills and Code to Expand the Reach of Your Apps with Silverlight
Frank La Vigne
?
Afik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex IntroAfik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex Intro
Alphageeks
?
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
Troy Miles
?
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
Bala Subra
?
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
Bala Subra
?
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
vstorm83
?
Using FlexUnit 4 with Flash CS5
Using FlexUnit 4 with Flash CS5Using FlexUnit 4 with Flash CS5
Using FlexUnit 4 with Flash CS5
Ben Schmidtke III
?
Developing multi-screen applications using Adobe Integrated Runtime (AIR)
Developing multi-screen applications using Adobe Integrated Runtime (AIR)Developing multi-screen applications using Adobe Integrated Runtime (AIR)
Developing multi-screen applications using Adobe Integrated Runtime (AIR)
Sujit Reddy G
?
How and Why to extend Firefox
How and Why to extend FirefoxHow and Why to extend Firefox
How and Why to extend Firefox
Graham King
?
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
Francois Zaninotto
?
Flash-based audio and video communication
Flash-based audio and video communicationFlash-based audio and video communication
Flash-based audio and video communication
Kundan Singh
?
Benefits of the CodeIgniter Framework
Benefits of the CodeIgniter FrameworkBenefits of the CodeIgniter Framework
Benefits of the CodeIgniter Framework
Toby Beresford
?

Recently uploaded (20)

Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
jackalen173
?
Making GenAI Work: A structured approach to implementation
Making GenAI Work: A structured approach to implementationMaking GenAI Work: A structured approach to implementation
Making GenAI Work: A structured approach to implementation
Jeffrey Funk
?
How Air Coil Inductors Work By Cet Technology
How Air Coil Inductors Work By Cet TechnologyHow Air Coil Inductors Work By Cet Technology
How Air Coil Inductors Work By Cet Technology
CET Technology
?
Graphs & GraphRAG - Essential Ingredients for GenAI
Graphs & GraphRAG - Essential Ingredients for GenAIGraphs & GraphRAG - Essential Ingredients for GenAI
Graphs & GraphRAG - Essential Ingredients for GenAI
Neo4j
?
GDG Cloud Southlake #41: Shay Levi: Beyond the Hype:How Enterprises Are Using AI
GDG Cloud Southlake #41: Shay Levi: Beyond the Hype:How Enterprises Are Using AIGDG Cloud Southlake #41: Shay Levi: Beyond the Hype:How Enterprises Are Using AI
GDG Cloud Southlake #41: Shay Levi: Beyond the Hype:How Enterprises Are Using AI
James Anderson
?
RBM - PIXIAGE - AskPixi Page - Inpixon-MWC 2025.pptx
RBM - PIXIAGE - AskPixi Page - Inpixon-MWC 2025.pptxRBM - PIXIAGE - AskPixi Page - Inpixon-MWC 2025.pptx
RBM - PIXIAGE - AskPixi Page - Inpixon-MWC 2025.pptx
quinlan4
?
How to manage technology risk and corporate growth
How to manage technology risk and corporate growthHow to manage technology risk and corporate growth
How to manage technology risk and corporate growth
Arlen Meyers, MD, MBA
?
ºÝºÝߣs from Perth MuleSoft Meetup March 2025
ºÝºÝߣs from Perth MuleSoft Meetup March 2025ºÝºÝߣs from Perth MuleSoft Meetup March 2025
ºÝºÝߣs from Perth MuleSoft Meetup March 2025
Michael Price
?
The Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptxThe Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptx
zsbaranyai
?
A General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithmsA General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithms
Buhwan Jeong
?
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing EnvironmentsAutomated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Pablo G¨®mez Abajo
?
Dev Dives: Unleash the power of macOS Automation with UiPath
Dev Dives: Unleash the power of macOS Automation with UiPathDev Dives: Unleash the power of macOS Automation with UiPath
Dev Dives: Unleash the power of macOS Automation with UiPath
UiPathCommunity
?
UiPath Automation Developer Associate Training Series 2025 - Session 8
UiPath Automation Developer Associate Training Series 2025 - Session 8UiPath Automation Developer Associate Training Series 2025 - Session 8
UiPath Automation Developer Associate Training Series 2025 - Session 8
DianaGray10
?
The Future is Here ¨C Learn How to Get Started! Ionic App Development
The Future is Here ¨C Learn How to Get Started! Ionic App DevelopmentThe Future is Here ¨C Learn How to Get Started! Ionic App Development
The Future is Here ¨C Learn How to Get Started! Ionic App Development
7Pillars
?
The Rise of AI Agents-From Automation to Autonomous Technology
The Rise of AI Agents-From Automation to Autonomous TechnologyThe Rise of AI Agents-From Automation to Autonomous Technology
The Rise of AI Agents-From Automation to Autonomous Technology
Impelsys Inc.
?
I am afraid of no test! The power of BDD
I am afraid of no test! The power of BDDI am afraid of no test! The power of BDD
I am afraid of no test! The power of BDD
Ortus Solutions, Corp
?
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN NB-IoT LTE cat.M1ÉÌÆ·¥ê¥¹¥È
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN  NB-IoT  LTE cat.M1ÉÌÆ·¥ê¥¹¥ÈDragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN  NB-IoT  LTE cat.M1ÉÌÆ·¥ê¥¹¥È
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN NB-IoT LTE cat.M1ÉÌÆ·¥ê¥¹¥È
CRI Japan, Inc.
?
Columbia Weather Systems - Product Overview
Columbia Weather Systems - Product OverviewColumbia Weather Systems - Product Overview
Columbia Weather Systems - Product Overview
Columbia Weather Systems
?
Presentation Session 2 -Context Grounding.pdf
Presentation Session 2 -Context Grounding.pdfPresentation Session 2 -Context Grounding.pdf
Presentation Session 2 -Context Grounding.pdf
Mukesh Kala
?
STARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to PonderSTARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to Ponder
anupriti
?
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
Fast Screen Recorder v2.1.0.11 Crack Updated [April-2025]
jackalen173
?
Making GenAI Work: A structured approach to implementation
Making GenAI Work: A structured approach to implementationMaking GenAI Work: A structured approach to implementation
Making GenAI Work: A structured approach to implementation
Jeffrey Funk
?
How Air Coil Inductors Work By Cet Technology
How Air Coil Inductors Work By Cet TechnologyHow Air Coil Inductors Work By Cet Technology
How Air Coil Inductors Work By Cet Technology
CET Technology
?
Graphs & GraphRAG - Essential Ingredients for GenAI
Graphs & GraphRAG - Essential Ingredients for GenAIGraphs & GraphRAG - Essential Ingredients for GenAI
Graphs & GraphRAG - Essential Ingredients for GenAI
Neo4j
?
GDG Cloud Southlake #41: Shay Levi: Beyond the Hype:How Enterprises Are Using AI
GDG Cloud Southlake #41: Shay Levi: Beyond the Hype:How Enterprises Are Using AIGDG Cloud Southlake #41: Shay Levi: Beyond the Hype:How Enterprises Are Using AI
GDG Cloud Southlake #41: Shay Levi: Beyond the Hype:How Enterprises Are Using AI
James Anderson
?
RBM - PIXIAGE - AskPixi Page - Inpixon-MWC 2025.pptx
RBM - PIXIAGE - AskPixi Page - Inpixon-MWC 2025.pptxRBM - PIXIAGE - AskPixi Page - Inpixon-MWC 2025.pptx
RBM - PIXIAGE - AskPixi Page - Inpixon-MWC 2025.pptx
quinlan4
?
How to manage technology risk and corporate growth
How to manage technology risk and corporate growthHow to manage technology risk and corporate growth
How to manage technology risk and corporate growth
Arlen Meyers, MD, MBA
?
ºÝºÝߣs from Perth MuleSoft Meetup March 2025
ºÝºÝߣs from Perth MuleSoft Meetup March 2025ºÝºÝߣs from Perth MuleSoft Meetup March 2025
ºÝºÝߣs from Perth MuleSoft Meetup March 2025
Michael Price
?
The Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptxThe Road to SAP S4HANA Cloud with SAP Activate.pptx
The Road to SAP S4HANA Cloud with SAP Activate.pptx
zsbaranyai
?
A General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithmsA General introduction to Ad ranking algorithms
A General introduction to Ad ranking algorithms
Buhwan Jeong
?
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing EnvironmentsAutomated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Pablo G¨®mez Abajo
?
Dev Dives: Unleash the power of macOS Automation with UiPath
Dev Dives: Unleash the power of macOS Automation with UiPathDev Dives: Unleash the power of macOS Automation with UiPath
Dev Dives: Unleash the power of macOS Automation with UiPath
UiPathCommunity
?
UiPath Automation Developer Associate Training Series 2025 - Session 8
UiPath Automation Developer Associate Training Series 2025 - Session 8UiPath Automation Developer Associate Training Series 2025 - Session 8
UiPath Automation Developer Associate Training Series 2025 - Session 8
DianaGray10
?
The Future is Here ¨C Learn How to Get Started! Ionic App Development
The Future is Here ¨C Learn How to Get Started! Ionic App DevelopmentThe Future is Here ¨C Learn How to Get Started! Ionic App Development
The Future is Here ¨C Learn How to Get Started! Ionic App Development
7Pillars
?
The Rise of AI Agents-From Automation to Autonomous Technology
The Rise of AI Agents-From Automation to Autonomous TechnologyThe Rise of AI Agents-From Automation to Autonomous Technology
The Rise of AI Agents-From Automation to Autonomous Technology
Impelsys Inc.
?
I am afraid of no test! The power of BDD
I am afraid of no test! The power of BDDI am afraid of no test! The power of BDD
I am afraid of no test! The power of BDD
Ortus Solutions, Corp
?
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN NB-IoT LTE cat.M1ÉÌÆ·¥ê¥¹¥È
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN  NB-IoT  LTE cat.M1ÉÌÆ·¥ê¥¹¥ÈDragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN  NB-IoT  LTE cat.M1ÉÌÆ·¥ê¥¹¥È
Dragino¥×¥í¥À¥¯¥È¥«¥¿¥í¥° LoRaWAN NB-IoT LTE cat.M1ÉÌÆ·¥ê¥¹¥È
CRI Japan, Inc.
?
Presentation Session 2 -Context Grounding.pdf
Presentation Session 2 -Context Grounding.pdfPresentation Session 2 -Context Grounding.pdf
Presentation Session 2 -Context Grounding.pdf
Mukesh Kala
?
STARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to PonderSTARLINK-JIO-AIRTEL Security issues to Ponder
STARLINK-JIO-AIRTEL Security issues to Ponder
anupriti
?

Flash Development Guide

  • 1. Flash Sharing Lesson 2Flash Development GuideBy Stanley Fok
  • 2. We will talk about¡­Flash Development Environment SetupFlash Programming ModelOOP in FlashFlash Programming Best Practice
  • 4. FlashDevelopA famous open source ActionScript EditorUseful Features Include: Code hintsCode completionCode generationCode searchingFeature Tour: http://www.flashdevelop.org/wikidocs/index.php?title=Features:Interface
  • 5. FlashTracerFlash tracer is a firefox extension which enables you to see all the output generated by any running flash swf movies in browserDownload:http://www.sephiroth.it/firefox/flashtracer/
  • 6. FlashTracer ConfigurationInstall Flash Debug Playerhttp://www.adobe.com/support/flashplayer/downloads.htmlflashlog.txt pathWindows XP: C:\Documents and Settings\{user}\Application Data\Macromedia\Flash Player\Logs\flashlog.txtWindows Vista: C:\Users\{user}\AppData\Roaming\Macromedia\Flash Player\Logs\flashlog.txtLinux: home/username/.macromedia/Flash_Player/Logs/flashlog.txtOSX: /Users/{username}/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt
  • 7. Firebug & HttpWatchUseful to trace Request and Response between Flash Movie and ServerFirebug (only Firefox): http://getfirebug.com/HttpWatch (IE and Firefox): http://www.httpwatch.com/
  • 9. Program Entry PointFlash is an event-driven programNo specific program entry pointUnlike java / C, there is no ¡°main function¡± as the entry point and main loopCode logic is usually triggered by:Event handlerTimelineUI Class constructor
  • 10. Application ArchitectureCode LogicActionScriptUI DefinitionFLA fileServer ResponseXML / JSONControllerModelView
  • 11. Class StructureFlash Display ComponentsMovieClip, Sprit, ¡­Other Flash Core LibrariesAS3 Core LibrariesExtendsImports / ExtendsUI ClassesHelper ClassesData ClassesApplication Libraries
  • 12. UI ClassTell the UI how to ¡°react¡± with different eventsUI ClassConstructorthis.addEventListener(MouseEvent.Click, this. handleMouseClick);Event Handlersprivate function handleMouseClick(¡­) {}UI Class Pattern
  • 13. Helper ClassImplements reusable methods / business logic which can be shared within the application / across projects, e.g.String OperationServer CommunicationSound ManagerUsually implemented as static class
  • 14. Data ClassTo define the variables and methods of a data object, e.g.A user has attributes:namegenderphotoPathAnd methods:save();logOut();
  • 16. Comparing AS3.0 and Javahttp://flexblog.faratasystems.com/?p=115
  • 17. Demo TimeCreating Our First OOP Flash Application
  • 18. Steps to FollowFlashDevelop SetupFlash Movie SetupDefine UI TreeWrite the ClassesLink the Classes with UICompile!
  • 19. The UI and Class Structure in this demoStageiconWheelMcClass: IconWheelinfoMciconContainerMcClass: IconContainerDynamic attachcoverMciconMciconMcClass: IconiconMc
  • 20. Flash Programming Best PracticeRules to speed up development
  • 21. Flash¡¯s Common ProblemsNo standard programming framework Long compile timeLong debug timeInvolves many people within the projectFrequently changing requirement from client
  • 22. Rule #1Extract platform dependent config into XML files
  • 23. Aim: Make application more portablePlatform Dependent Variables, such ashost name, API URLshould not be hardcoded inside ActionScriptThe Flash Application should be able to port onto any platform without compilation
  • 24. Rule #2Identify and extract frequently changing variables to XML
  • 25. Aim: Speed up debugging timeFrequently changing variables:Visual effect parametersWarning messagesCompilation is not needed during testProvide room for designer to adjust visual effect without editing ActionScript
  • 26. Rule #3ActionScript should be extracted out from .FLA files and write into .AS files
  • 27. Aim: To let programmer and designer work in parallelIn the timeline of FLA, only allow:Timeline control function,play(), stop(), gotoAndPlay(), etcTriggering functions defined in .AS files
  • 28. Rule #4Ensure Flash App is able to run in Flash IDE already / in local drive
  • 29. Aim: Speed up debugging timeDo not need to copy the complied .SWF files to server and reload browser to debug every timeCan be achieve by:Not using relative path for API or other assets:Do: http://www.abc.com/php/getData.phpDo not: /php/getData.php
  • 30. Flash Player ¡°Global Security Setting¡±Allow the application access data from other domain when testing in local drive http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
  • 31. Rule #5Ensure subsections SWF able to run independently
  • 32. Aim: Speed up debugging timeMore concentrate on debugging a Flash sectionHomeSection 1Section 2Section 1aDebug entry point
  • 33. Rule #6Plan well the UI structure before development
  • 34. Aim: Leave room for designer to add timeline effectMake UI Class independent of UI structureStageiconWheelMcStageinfoMciconContainerMccoverMcinfoMciconContainerMccoverMcNot modulizedModulized
  • 35. Rule #7Avoid using parent, root
  • 36. Aim: Make UI Code independent of UI structureUI Structure will be usually changed during integration phaseWhen the Flash become very complex, you will see horrible code like:parent.parent.parent.parent¡­ Please avoid it!!!Avoid traversing the UI tree when accessing objects in other .SWF fileTry singleton or global variable (by static class variable)
  • 37. The ¡°Root¡± reference issueIf start from home.swf ¡­In AS 2.0¡­home.swfRootIf start from section1a.swf ¡­section1a.swfsection1.swfsection2.swfRootsection1a.swf
  • 38. The ¡°Root¡± reference issueIf start from home.swf ¡­In AS 3.0¡­home.swfStageRootIf start from section1a.swf ¡­section1a.swfRootsection1.swfsection2.swfStageRootRootsection1a.swfRoot

Editor's Notes

  • #10: Breifly show how code is triggered