Open Source Flash 101


  'G' Gaurav Narain Saxena
   Akron Linux User Group
       January 7, 2010
Outline
●   Flash
●   ActionScript
●   Open Source Adobe
●   Open Source Flash
●   Salasaga
●   mtasc
●   swfmill
●   Swft...
Flash
●   "Like television for internet users"
●   Written in C++
●   Allows you to:
        –   Annotate web page with:
 ...
Flash
●   Concepts
       –   Timeline
       –   Stage
       –   Objects
       –   Controls
       –   etc.
Flash
ActionScript
●   Javascript for HTML= ActionScript for Flash
●   Scripting language based on ECMAScript
●   Extension: .as...
ActionScript
Example (AS2): HelloWorld.as
class HelloWorld extends MovieClip
{
public function HelloWorld() {}
public func...
Open Source Adobe
●   Flex SDK
        –    Cross platform framework; provides compilers,
              libraries, debugge...
Open Source Adobe
●   Text Layout Framework: Typography
Open Source Flash
●   "Like sourceforge.net for open source flash
    enthusiasts"
●   Collaboration
        –   list: htt...
Open Source Flash
●   History
       –   May, 2005: Aral Balkan, Sonke Rohde,
            Nicolas Cannasse (MTASC) “Eureka...
Open Source Flash
●   Source code used to be shared
           –   Binary .fla files
           –   ActionScript Classes
●...
Open Source Flash
●   OSFlash.org incubates all these projects collected under
    one roof
●   Doesn't stop !
●   Excitin...
Open Source Flash
●   Integrated Development     ●   Utilities
    Environment Alternatives   ●   Flash Applications
●   C...
●   Open Source IDE for creating flash based
    eLearning (alpha software)
●   GPL, developed on Linux
●   What can you d...
●   Demo in Firefox (.swf) or here
mtasc
●   First ActionScript 2 Open Source Compiler
●   What you can do:
       –   Compile large .as classes in very shor...
mtasc
●   Example:
    class Hello

    {

        static var app : Hello;

        function Hello() {

            _root....
mtasc
●   $ mtasc -swf hello.swf -main -header
    800:600:20 hello.as
swfmill
●   Xml2swf swf2xml processor (can import)
●   Generates asset libs for MTASC or haXe
●   Built around xslt
●   Wh...
swfmill
●   Example.xml:
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <movie width="320" height="240" framerate="1...
swfmill
●   $ swfmill simple example.xml example.swf
swftools
●   Collection of utilities to work with .swf's
●   Mostly on command line
●   Loves to have:
        –   Freetyp...
swftools
●   What you can do:        ●   What you can do:
       –   Pdf2swf                 –   Wav2swf
       –   Swfcom...
swftools




           Pdf2swf
           example
Take Home
●   Flash has 99.99% market share
        –   (nah, just kidding)
●   Tools exist that facilitate usage of the f...
Questions?
References
●   osflash.org
●   Adobe flash
●   Open Source Adobe
●   salasaga.org
●   swfmill.org
●   mtasc.org
●   swftoo...
Upcoming SlideShare
Loading in …5
×

Open Source Flash 2010

2,216 views
2,135 views

Published on

Photoshop is to Gimp, Illustrator is to Inkscape, Microsoft Office is to Open Office - since 2005, Open Source Flash refers to building knowledge/tools/programs for the Flash platform. Their main website is osflash.org and they serve as a wiki/forum/vehicle to generate awareness and contain useful resources. In the talk I hope to share history and knowledge of a few useful tools that can be used in/developed on linux. Example - compilers, development environments, etc.

Published in: Education, Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,216
On SlideShare
0
From Embeds
0
Number of Embeds
21
Actions
Shares
0
Downloads
34
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Open Source Flash 2010

  1. 1. Open Source Flash 101 'G' Gaurav Narain Saxena Akron Linux User Group January 7, 2010
  2. 2. Outline ● Flash ● ActionScript ● Open Source Adobe ● Open Source Flash ● Salasaga ● mtasc ● swfmill ● Swftools ● References
  3. 3. Flash ● "Like television for internet users" ● Written in C++ ● Allows you to: – Annotate web page with: ● Animation, adverts, other flash components ● Navigation – RIA ● Streams of video ● Proprietary
  4. 4. Flash ● Concepts – Timeline – Stage – Objects – Controls – etc.
  5. 5. Flash
  6. 6. ActionScript ● Javascript for HTML= ActionScript for Flash ● Scripting language based on ECMAScript ● Extension: .as ● Main points: – Cross platform – Manifested in flash and flex – platforms – Designed by Gary Grossman (1998) – Versions: AS3, AS2
  7. 7. ActionScript Example (AS2): HelloWorld.as class HelloWorld extends MovieClip { public function HelloWorld() {} public function onLoad:Void{ var txtHello:TextField = this.createTextField( “txtHello”,0,0,0,100,100); txtHello.text = “Hello, World!”; }// displays 100x100 box with “Hello, World!” in it.
  8. 8. Open Source Adobe ● Flex SDK – Cross platform framework; provides compilers, libraries, debugger ● Adobe-Mozilla Tamarin – Open engine for ActionScript 3 ● BladeDS – Server based Java remoting and web messaging technology ● Webkit – Open source browser engine, OSX framework used on apple computers
  9. 9. Open Source Adobe ● Text Layout Framework: Typography
  10. 10. Open Source Flash ● "Like sourceforge.net for open source flash enthusiasts" ● Collaboration – list: http://osflash.org/mailman/listinfo/ – irc: irc://irc.freenode.org##swf ● Hosts and links to projects related to open source flash development
  11. 11. Open Source Flash ● History – May, 2005: Aral Balkan, Sonke Rohde, Nicolas Cannasse (MTASC) “Eureka!” – June, 2005: Number of projects: 10 – January, 2008: Number of projects: 120 – Today: has many more project, a handful of broken links – cool nonetheless
  12. 12. Open Source Flash ● Source code used to be shared – Binary .fla files – ActionScript Classes ● 2004: MTASC2 [MotionTwin ActionScript Compiler]released, – kicked off Flash IDE Dev Projects ● Swfmill, Axdt, AMES, FlashDevelop etc. ● Frameworks started appearing: – Arp, Cairngorm, PureMVC ● Developers: – Started embracing these frameworks – Worked in teams – Build scalable solutions – All this independent of Flash IDE or Flex
  13. 13. Open Source Flash ● OSFlash.org incubates all these projects collected under one roof ● Doesn't stop ! ● Exciting technologies for Flash Platform are created: – Papervision 3D: 3D Library for Flash – Red5: Open Source server to handle audio, video, and real-time shared objects – SWX: Native data format for Flash platform – Flex3, Flex SDK, Compilers
  14. 14. Open Source Flash ● Integrated Development ● Utilities Environment Alternatives ● Flash Applications ● Command line tools, ● Servers and Remoting compilers ● Logging Tools ● Eclipse Plugins ● Debugging tools ● ActionScript libraries ● Documentation Systems ● Frameworks ● Flash Players ● Tweening, Animation and Physics ● SWF Readers ● Unit testing
  15. 15. ● Open Source IDE for creating flash based eLearning (alpha software) ● GPL, developed on Linux ● What can you do: – Create instructional videos – Get a feel for timeline and other Concepts
  16. 16. ● Demo in Firefox (.swf) or here
  17. 17. mtasc ● First ActionScript 2 Open Source Compiler ● What you can do: – Compile large .as classes in very short time – Generate .swf without flash – the tool itself! ● Superseded by haXe
  18. 18. mtasc ● Example: class Hello { static var app : Hello; function Hello() { _root.createTextField("tf",0,0,0,800,600); // creates a 'tf' TextField size 800x600 at pos 0,0 _root.tf.text = "Hello world !"; // write some text into it } static function main(mc) { // entry point app = new Hello(); } }
  19. 19. mtasc ● $ mtasc -swf hello.swf -main -header 800:600:20 hello.as
  20. 20. swfmill ● Xml2swf swf2xml processor (can import) ● Generates asset libs for MTASC or haXe ● Built around xslt ● What you can do: – Import images, fonts – Add components – Create movieclips – Place clips on the stage – Create text fields
  21. 21. swfmill ● Example.xml: <?xml version="1.0" encoding="iso-8859-1" ?> <movie width="320" height="240" framerate="12"> <background color="#ffffff"/> <frame> <library> <clip id="foo" import="library/foo.jpg"/> </library> </frame> </movie>
  22. 22. swfmill ● $ swfmill simple example.xml example.swf
  23. 23. swftools ● Collection of utilities to work with .swf's ● Mostly on command line ● Loves to have: – Freetype libraries from freetype.org – Jpeg libraries from ijg.org
  24. 24. swftools ● What you can do: ● What you can do: – Pdf2swf – Wav2swf – Swfcombine – Avi2swf – Swfstrings – Font2swf – Swfdump – Swfbbox – Jpeg2swf – Swfc – Png2swf – Swfextract – gif2swf – as3compile
  25. 25. swftools Pdf2swf example
  26. 26. Take Home ● Flash has 99.99% market share – (nah, just kidding) ● Tools exist that facilitate usage of the flash platform which you can adopt for your application domain: – Sciences – Programming – Sysadmin? (atleast the command line ones)
  27. 27. Questions?
  28. 28. References ● osflash.org ● Adobe flash ● Open Source Adobe ● salasaga.org ● swfmill.org ● mtasc.org ● swftools.org ● ActionScript Wiki ● ActionScript 2 Language Reference

×