SlideShare a Scribd company logo
Flash Sharing Lesson 2Flash Development Guide By Stanley Fok
We will talk about… Flash Development Environment Setup Flash Programming Model OOP in Flash Flash Programming Best Practice
Flash Development Environment Setup
FlashDevelop A famous open source ActionScript Editor Useful Features Include:  Code hints Code completion Code generation Code searching Feature Tour: http://www.flashdevelop.org/wikidocs/index.php?title=Features:Interface
FlashTracer Flash tracer is a firefox extension which enables you to see all the output generated by any running flash swf movies in browser Download:http://www.sephiroth.it/firefox/flashtracer/
FlashTracer Configuration Install Flash Debug Player http://www.adobe.com/support/flashplayer/downloads.html flashlog.txt path Windows XP: C:ocuments and Settingsuser}pplication Dataacromedialash Playerogslashlog.txt Windows Vista: C:sersuser}ppDataoamingacromedialash Playerogslashlog.txt Linux: home/username/.macromedia/Flash_Player/Logs/flashlog.txt OSX: /Users/{username}/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt
Firebug & HttpWatch Useful to trace Request and Response between Flash Movie and Server Firebug (only Firefox): http://getfirebug.com/ HttpWatch (IE and Firefox): http://www.httpwatch.com/
Flash Programming Model
Program Entry Point Flash is an event-driven program No specific program entry point Unlike java / C, there is no “main function” as the entry point and main loop Code logic is usually triggered by: Event handler Timeline UI Class constructor
Application Architecture Code Logic ActionScript UI Definition FLA file Server Response XML / JSON Controller Model View
Class Structure Flash Display Components MovieClip, Sprit, … Other Flash Core Libraries AS3 Core Libraries Extends Imports / Extends UI Classes Helper Classes Data Classes Application Libraries
UI Class Tell the UI how to “react” with different events UI Class Constructor this.addEventListener(MouseEvent.Click, this. handleMouseClick); Event Handlers private function handleMouseClick(…) {} UI Class Pattern
Helper Class Implements reusable methods / business logic which can be shared within the application / across projects, e.g. String Operation Server Communication Sound Manager Usually implemented as static class
Data Class To define the variables and methods of a data object, e.g. A user has attributes: name gender photoPath And methods: save(); logOut();
OOP in Flash
Comparing AS3.0 and Java http://flexblog.faratasystems.com/?p=115
Demo Time Creating Our First OOP Flash Application
Steps to Follow FlashDevelop Setup Flash Movie Setup Define UI Tree Write the Classes Link the Classes with UI Compile!
The UI and Class Structure in this demo Stage iconWheelMc Class: IconWheel infoMc iconContainerMc Class: IconContainer Dynamic attach coverMc iconMc iconMc Class: Icon iconMc
Flash Programming Best Practice Rules to speed up development
Flash’s Common Problems No standard programming framework  Long compile time Long debug time Involves many people within the project Frequently changing requirement from client
Rule #1 Extract platform dependent config into XML files
Aim: Make application more portable Platform Dependent Variables, such as host name,  API URL should not be hardcoded inside ActionScript The Flash Application should be able to port onto any platform without compilation
Rule #2 Identify and extract frequently changing variables to XML
Aim: Speed up debugging time Frequently changing variables: Visual effect parameters Warning messages Compilation is not needed during test Provide room for designer to adjust visual effect without editing ActionScript
Rule #3 ActionScript should be extracted out from .FLA files and write into .AS files
Aim: To let programmer and designer work in parallel In the timeline of FLA, only allow: Timeline control function, play(), stop(), gotoAndPlay(), etc Triggering functions defined in .AS files
Rule #4 Ensure Flash App is able to run in Flash IDE already / in local drive
Aim: Speed up debugging time Do not need to copy the complied .SWF files to server and reload browser to debug every time Can be achieve by: Not using relative path for API or other assets: Do: http://www.abc.com/php/getData.php Do 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 #5 Ensure subsections SWF able to run independently
Aim: Speed up debugging time More concentrate on debugging a Flash section Home Section 1 Section 2 Section 1a Debug entry point
Rule #6 Plan well the UI structure before development
Aim:  Leave room for designer to add timeline effect Make UI Class independent of UI structure Stage iconWheelMc Stage infoMc iconContainerMc coverMc infoMc iconContainerMc coverMc Not modulized Modulized
Rule #7 Avoid using parent, root
Aim: Make UI Code independent of UI structure UI Structure will be usually changed during integration phase When 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 file Try singleton or global variable (by static class variable)
The “Root” reference issue If start from home.swf … In AS 2.0… home.swf Root If start from section1a.swf … section1a.swf section1.swf section2.swf Root section1a.swf
The “Root” reference issue If start from home.swf … In AS 3.0… home.swf Stage Root If start from section1a.swf … section1a.swf Root section1.swf section2.swf Stage Root Root section1a.swf Root
What’s coming… Visual Effect Programming Skills

More Related Content

What's hot

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
 

What's hot (20)

Joomla 15 Quickstart
Joomla 15 QuickstartJoomla 15 Quickstart
Joomla 15 Quickstart
 
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
 
Social website
Social websiteSocial website
Social website
 
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
 
Installing Extensions in Joomla! 2.5
Installing Extensions in Joomla! 2.5Installing Extensions in Joomla! 2.5
Installing Extensions in Joomla! 2.5
 
Joomla CMS SEMINAR PPT
Joomla CMS SEMINAR PPTJoomla CMS SEMINAR PPT
Joomla CMS SEMINAR PPT
 
Joomla Platform, por David Hurley
Joomla Platform, por David HurleyJoomla Platform, por David Hurley
Joomla Platform, por David Hurley
 
Joomla Day1
Joomla  Day1Joomla  Day1
Joomla Day1
 
Advantages And Disadvantages Of Joomla
Advantages And Disadvantages Of JoomlaAdvantages And Disadvantages Of Joomla
Advantages And Disadvantages Of Joomla
 
The Business of Microsoft Silverlight
The Business of Microsoft SilverlightThe Business of Microsoft Silverlight
The Business of Microsoft Silverlight
 
Selenium - automated browser-based testing -
Selenium - automated browser-based testing -Selenium - automated browser-based testing -
Selenium - automated browser-based testing -
 
Joomla Introduction & Installation Tutorial
Joomla Introduction & Installation TutorialJoomla Introduction & Installation Tutorial
Joomla Introduction & Installation Tutorial
 
Basics of Joomla!
Basics of Joomla! Basics of Joomla!
Basics of Joomla!
 
PHPBootCamp - Joomla! Framework
PHPBootCamp - Joomla! FrameworkPHPBootCamp - Joomla! Framework
PHPBootCamp - Joomla! Framework
 
Getting Started with the Joomla! Framework
Getting Started with the Joomla! FrameworkGetting Started with the Joomla! Framework
Getting Started with the Joomla! Framework
 
Introduction to Joomla
Introduction to JoomlaIntroduction to Joomla
Introduction to Joomla
 
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
 
CMS Joomla
CMS JoomlaCMS Joomla
CMS Joomla
 
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
 
Cambodia Open Source Essential Training
Cambodia Open Source Essential TrainingCambodia Open Source Essential Training
Cambodia Open Source Essential Training
 

Similar to Flash Development Guide

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 Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
Bala Subra
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and 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
 

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)
 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
 
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
 
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
 
Php Web Frameworks
Php Web FrameworksPhp Web Frameworks
Php Web Frameworks
 
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant KillerPhp Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant Killer
 
Flex Introduction
Flex Introduction Flex Introduction
Flex Introduction
 
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
 
Afik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex IntroAfik Gal @alphageeks: Flex Intro
Afik Gal @alphageeks: Flex Intro
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Using FlexUnit 4 with Flash CS5
Using FlexUnit 4 with Flash CS5Using FlexUnit 4 with Flash CS5
Using FlexUnit 4 with Flash CS5
 
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)
 
How and Why to extend Firefox
How and Why to extend FirefoxHow and Why to extend Firefox
How and Why to extend Firefox
 
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
 
Flash-based audio and video communication
Flash-based audio and video communicationFlash-based audio and video communication
Flash-based audio and video communication
 
Benefits of the CodeIgniter Framework
Benefits of the CodeIgniter FrameworkBenefits of the CodeIgniter Framework
Benefits of the CodeIgniter Framework
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 

Recently uploaded

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 

Recently uploaded (20)

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 

Flash Development Guide

  • 1. Flash Sharing Lesson 2Flash Development Guide By Stanley Fok
  • 2. We will talk about… Flash Development Environment Setup Flash Programming Model OOP in Flash Flash Programming Best Practice
  • 4. FlashDevelop A famous open source ActionScript Editor Useful Features Include: Code hints Code completion Code generation Code searching Feature Tour: http://www.flashdevelop.org/wikidocs/index.php?title=Features:Interface
  • 5. FlashTracer Flash tracer is a firefox extension which enables you to see all the output generated by any running flash swf movies in browser Download:http://www.sephiroth.it/firefox/flashtracer/
  • 6. FlashTracer Configuration Install Flash Debug Player http://www.adobe.com/support/flashplayer/downloads.html flashlog.txt path Windows XP: C:ocuments and Settingsuser}pplication Dataacromedialash Playerogslashlog.txt Windows Vista: C:sersuser}ppDataoamingacromedialash Playerogslashlog.txt Linux: home/username/.macromedia/Flash_Player/Logs/flashlog.txt OSX: /Users/{username}/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt
  • 7. Firebug & HttpWatch Useful to trace Request and Response between Flash Movie and Server Firebug (only Firefox): http://getfirebug.com/ HttpWatch (IE and Firefox): http://www.httpwatch.com/
  • 9. Program Entry Point Flash is an event-driven program No specific program entry point Unlike java / C, there is no “main function” as the entry point and main loop Code logic is usually triggered by: Event handler Timeline UI Class constructor
  • 10. Application Architecture Code Logic ActionScript UI Definition FLA file Server Response XML / JSON Controller Model View
  • 11. Class Structure Flash Display Components MovieClip, Sprit, … Other Flash Core Libraries AS3 Core Libraries Extends Imports / Extends UI Classes Helper Classes Data Classes Application Libraries
  • 12. UI Class Tell the UI how to “react” with different events UI Class Constructor this.addEventListener(MouseEvent.Click, this. handleMouseClick); Event Handlers private function handleMouseClick(…) {} UI Class Pattern
  • 13. Helper Class Implements reusable methods / business logic which can be shared within the application / across projects, e.g. String Operation Server Communication Sound Manager Usually implemented as static class
  • 14. Data Class To define the variables and methods of a data object, e.g. A user has attributes: name gender photoPath And methods: save(); logOut();
  • 16. Comparing AS3.0 and Java http://flexblog.faratasystems.com/?p=115
  • 17. Demo Time Creating Our First OOP Flash Application
  • 18. Steps to Follow FlashDevelop Setup Flash Movie Setup Define UI Tree Write the Classes Link the Classes with UI Compile!
  • 19. The UI and Class Structure in this demo Stage iconWheelMc Class: IconWheel infoMc iconContainerMc Class: IconContainer Dynamic attach coverMc iconMc iconMc Class: Icon iconMc
  • 20. Flash Programming Best Practice Rules to speed up development
  • 21. Flash’s Common Problems No standard programming framework Long compile time Long debug time Involves many people within the project Frequently changing requirement from client
  • 22. Rule #1 Extract platform dependent config into XML files
  • 23. Aim: Make application more portable Platform Dependent Variables, such as host name, API URL should not be hardcoded inside ActionScript The Flash Application should be able to port onto any platform without compilation
  • 24. Rule #2 Identify and extract frequently changing variables to XML
  • 25. Aim: Speed up debugging time Frequently changing variables: Visual effect parameters Warning messages Compilation is not needed during test Provide room for designer to adjust visual effect without editing ActionScript
  • 26. Rule #3 ActionScript should be extracted out from .FLA files and write into .AS files
  • 27. Aim: To let programmer and designer work in parallel In the timeline of FLA, only allow: Timeline control function, play(), stop(), gotoAndPlay(), etc Triggering functions defined in .AS files
  • 28. Rule #4 Ensure Flash App is able to run in Flash IDE already / in local drive
  • 29. Aim: Speed up debugging time Do not need to copy the complied .SWF files to server and reload browser to debug every time Can be achieve by: Not using relative path for API or other assets: Do: http://www.abc.com/php/getData.php Do 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 #5 Ensure subsections SWF able to run independently
  • 32. Aim: Speed up debugging time More concentrate on debugging a Flash section Home Section 1 Section 2 Section 1a Debug entry point
  • 33. Rule #6 Plan well the UI structure before development
  • 34. Aim: Leave room for designer to add timeline effect Make UI Class independent of UI structure Stage iconWheelMc Stage infoMc iconContainerMc coverMc infoMc iconContainerMc coverMc Not modulized Modulized
  • 35. Rule #7 Avoid using parent, root
  • 36. Aim: Make UI Code independent of UI structure UI Structure will be usually changed during integration phase When 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 file Try singleton or global variable (by static class variable)
  • 37. The “Root” reference issue If start from home.swf … In AS 2.0… home.swf Root If start from section1a.swf … section1a.swf section1.swf section2.swf Root section1a.swf
  • 38. The “Root” reference issue If start from home.swf … In AS 3.0… home.swf Stage Root If start from section1a.swf … section1a.swf Root section1.swf section2.swf Stage Root Root section1a.swf Root
  • 39. What’s coming… Visual Effect Programming Skills

Editor's Notes

  1. Breifly show how code is triggered