340 likes | 525 Views
A ‘Flash’ of Freshness : Repurposing Existing Flash Content for Use in Mobile Development. Agenda. Introductions Objective What we are not going to cover Basic r eusability - Example #1 Advanced r eusability - Example # 1 Advanced reusability - Example #2
E N D
A ‘Flash’ of Freshness: Repurposing Existing Flash Content for Use in Mobile Development
Agenda • Introductions • Objective • What we are not going to cover • Basic reusability - Example #1 • Advanced reusability - Example #1 • Advanced reusability - Example #2 • Applying previous examples to mobile • Creating an IPad app • Questions
Introductions • Mike Raines • eLearning & Web Developer for ICF International • Flash, ActionScript, HTML, JavaScript experience Micheal.Raines@icfi.com @elearnDevGeek
Objectives • How to repurpose existing Flash content for use in mobile development • Techniques for maximizing reusability in your Flash projects
What we are not going to cover • Developer Certificates • Provisioning Profiles • Final packaging for app stores
Visual Aids • ActionScript • Flash • FlashBuilder • Dreamweaver • XML
What do I mean by ‘Reusability’? • Develop once, use many times
Basic Reusability • Simple MovieClip • No ActionScript in MovieClip
Basic reusability • Add ActionScript elsewhere • Main timeline • Another MovieClip
Example #1: Flash / XML banner • Creating a class • What is a class? • Basic set of instructions • Not reinventing the wheel • Building on what has come before
Example #1: Flash / XML banner • Why Build a class? • Reuse • Make it’s purpose very specific
Example #1: Flash / XML Banner • Why use XML? • Specific != boring • Expand reusability
Example #2 Flash / XML interactions • Same concept – more complexity
Applying previous examples to mobile via FlashBuilder & AIR • Loading a SWF at runtime • Embedding a SWF • Importing SWC library
Loading a basic SWF • Loaded SWF’s offer more flexibility • Loaded SWF’s can be “defined” at runtime via user action or external data (XML, JSON) • Loaded SWF’s CANNOT contain ActionScript*
Embedding a basic SWF • Embedded SWF’s are hard coded into your app • Embedded SWF’s are compiled during the build process • Embedded SWF’s CAN contain code
SWC explained “An Adobe SWC file is a package of precompiled Flash symbols and ActionScript code that allows a Flash or Flex developer to distribute classes and assets, or to avoid recompiling symbols and code that will not change.[1] SWC files can be generated by the Flash authoring tool, and by Flex. They are sometimes referred to as class libraries and cannot be directly executed by the Flash Player.” http://en.wikipedia.org/wiki/Adobe_SWC_file
Do I need a SWC for each SWF? • Yes! • No! • Maybe?
Some assembly required • Existing Flash pieces will need modification • Paths • Strict ActionScript code • File types
Creating a project with FlashBuilder • You have some options
Creating an IPad app: steps • Name • Build Paths • SDK
Creating an IPad app: steps • Platform • Basic app settings
Creating an IPad app: steps • Target device
Creating an IPad app: steps • Library path • Assets • Classes
Creating an IPad App: steps • Library path • Flex SDK • SWCs
Creating an IPad app: steps • Certificate • Provisioning Profile
Creating an IPad app: steps • Package contents
Creating an IPad app: starting files Main.as Main-app.xml
Contact Us eLearnDevTech blog: http://elearndevtech.blogspot.com Twitter : @ICFI , @elearnDevGeek, @gardelearndev, @mas_edev