SlideShare a Scribd company logo
1 of 51
Object Oriented
 Programming
      In Flash
Donny Wals
      @donnywals




Front-end developer
Agenda


• Hoe herken ik een object?
• Flash en OOP
Objecten herkennen
   Een voorbeeld uit het dierenrijk
Leeuw
Leeuw


Katachtige
Leeuw


Katachtige


Vleeseter
Leeuw


Katachtige


Vleeseter


Zoogdier
Leeuw


Katachtige


Vleeseter


Zoogdier


Organisme
Luipaard    Leeuw       Huiskat
                                            Mens

   Hond         Katachtige       Primaat


Planteneter     Vleeseter       Alleseter


 Eencellig      Zoogdier


                Organisme
Luipaard    Leeuw       Huiskat
                                             Mens

   Hond         Katachtige       Primaat

Zoek
        ge
Planteneter     Vleeseter
             deeld              Alleseter
                  e eigen
                          scha
 Eencellig      Zoogdier      p        pen
                Organisme
Objecten herkennen
   Een voorbeeld uit de praktijk
Welke objecten zie je?
Welke objecten zie je?
Welke objecten zie je?
Interessant:
  Nummerbeer


     Beer
Interessant:
 Een normale beer.
   Maar met een         Nummerbeer
nummer op zijn buik
                                      Een normale beer.
                           Beer            Hij kan in
                                     verschillende kleuren
                                           en maten
                                          voorkomen
Flash en OOP
We hebben het hier dus niet over programmeren op de tijdlijn!!
Flash
Flash




TIJDLIJN
Flash

STAGE
Flash


        LIBRARY
Flash
SCENES
Flash
 PLAATS IN
DOCUMENT
Flash
BESTANDEN
Flash
 PROPERTIES
Properties
Properties

NAAM VAN
 OBJECT
Properties


             TYPE VAN
              OBJECT
Properties


  POSITIE EN
   MATEN
Belangrijk voor code

NAAM VAN
 OBJECT
Stappenplan
      Bedenken


     Ontwerpen


   Objecten bepalen


Overeenkomsten zoeken
      in objecten
En dan pas
programmeren!
Omslachtig?
Nee, het herschrijven van code is omslachtig
Een voorbeeld
           Doel:            Ontwerp:
Een wereldbol moet omhoog
en omlaag kunnen bewegen.

  Dit wordt bereikt door
 middel van twee knoppen
 waar de gebruiker op kan
          klikken.
Een voorbeeld
           Doel:            Ontwerp:
Een wereldbol moet omhoog
en omlaag kunnen bewegen.

  Dit wordt bereikt door
 middel van twee knoppen
 waar de gebruiker op kan
          klikken.

        Bedenken            Ontwerpen
Objecten bepalen

Pijl omhoog           Wereld



Pijl omlaag            De stage
                       (De Main class)
Overeenkomsten

Pijl omhoog
 (bedient blokje)            Wereld
                          (beweegt op en neer)




                             De stage
Pijl omlaag                  (De Main class)
 (bedient blokje)
Ik ga programmeren:

• Main Class (voor de stage)
• Wereld Class
• NavigatieKnop Class
Één navigatie class?
   Ja, de objecten zijn namelijk hetzelfde.
De Main class zorgt dat ze iets anders doen.
Demo
Samenvatting
Luipaard    Leeuw       Huiskat
                                             Mens

   Hond         Katachtige       Primaat

Zoek
        ge
Planteneter     Vleeseter
             deeld              Alleseter
                  e eigen
                          scha
 Eencellig      Zoogdier      p        pen
                Organisme
Stappenplan
      Bedenken


     Ontwerpen


   Objecten bepalen


Overeenkomsten zoeken
      in objecten
En dan pas
programmeren!
Soms lijken twee
objecten verschillend.
  Maar zijn ze in werkelijkheid hetzelfde
In Flash kun je ook AS
       schrijven.
Je kunt .as bestanden
koppelen aan objecten
      op de stage.
Met scènes kun je
‘levels’ onderscheiden
Vragen?
slideshare.com/donnywals

donnywals.com/hoorcollege.zip

   Bronnen voor hulp

     www.flashfocus.nl
   www.stackoverflow.com
   www.cmdantwoord.com
      Adobe livedocs
      www.lynda.com

More Related Content

More from Donny Wals

The Testing Games: Mocking, yay!
The Testing Games: Mocking, yay!The Testing Games: Mocking, yay!
The Testing Games: Mocking, yay!Donny Wals
 
Me and my importers
Me and my importersMe and my importers
Me and my importersDonny Wals
 
JSON and Swift, Still A Better Love Story Than Twilight
JSON and Swift, Still A Better Love Story Than TwilightJSON and Swift, Still A Better Love Story Than Twilight
JSON and Swift, Still A Better Love Story Than TwilightDonny Wals
 
Adopting tdd in the workplace
Adopting tdd in the workplaceAdopting tdd in the workplace
Adopting tdd in the workplaceDonny Wals
 
In Defense Of Core Data
In Defense Of Core DataIn Defense Of Core Data
In Defense Of Core DataDonny Wals
 
Effectively Producing And Shipping Frameworks For Multiple Platforms
Effectively Producing And Shipping Frameworks For Multiple PlatformsEffectively Producing And Shipping Frameworks For Multiple Platforms
Effectively Producing And Shipping Frameworks For Multiple PlatformsDonny Wals
 
Improving apps with iOS 10 notifications (do iOS 2016)
Improving apps with iOS 10 notifications (do iOS 2016)Improving apps with iOS 10 notifications (do iOS 2016)
Improving apps with iOS 10 notifications (do iOS 2016)Donny Wals
 

More from Donny Wals (7)

The Testing Games: Mocking, yay!
The Testing Games: Mocking, yay!The Testing Games: Mocking, yay!
The Testing Games: Mocking, yay!
 
Me and my importers
Me and my importersMe and my importers
Me and my importers
 
JSON and Swift, Still A Better Love Story Than Twilight
JSON and Swift, Still A Better Love Story Than TwilightJSON and Swift, Still A Better Love Story Than Twilight
JSON and Swift, Still A Better Love Story Than Twilight
 
Adopting tdd in the workplace
Adopting tdd in the workplaceAdopting tdd in the workplace
Adopting tdd in the workplace
 
In Defense Of Core Data
In Defense Of Core DataIn Defense Of Core Data
In Defense Of Core Data
 
Effectively Producing And Shipping Frameworks For Multiple Platforms
Effectively Producing And Shipping Frameworks For Multiple PlatformsEffectively Producing And Shipping Frameworks For Multiple Platforms
Effectively Producing And Shipping Frameworks For Multiple Platforms
 
Improving apps with iOS 10 notifications (do iOS 2016)
Improving apps with iOS 10 notifications (do iOS 2016)Improving apps with iOS 10 notifications (do iOS 2016)
Improving apps with iOS 10 notifications (do iOS 2016)
 

Hoorcollege Flash 9-2-2012

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n