« Thanks for the Cake!London Flash Platform Usergroup Meeting July »

8 comments

  1. § Emmanuel Okyere said on :
    Afaik, there are statically-typed and scripting languages; that they have their compilation units as classes or not, I think, is mostly a matter of organisation. Languages like Java, however afaik, have the idea of a class deeply ingrained in the language spec and the way developers are supposed to approach it.

    Actionscript grew in that direction, afaik, from the way earlier developers approached it.

    Cheers,
    Emmanuel
  2. § Richard Leggett® Email said on :
    Yes precisely, I didn't even go into the topic of statically typed vs. dynamic languages, that's a whole other topic, but it's still very much linked (you don't find too many statically typed prototype based languages though).

    Really, I find it interesting that AS3 looks so much like Java, but works in a very different way, and that makes it harder to predict in certain situations, but also more flexible in others!
  3. § Osc23 said on :
    Senocular's amazing set of daily AS3.0 tips may hold the answer in that timeline's are converted into classes...

    "If you do not associate a timeline with a class, one is automatically created for that timeline by Flash. When this happens, variables become class variables, all named functions (declared using function functionName(){}) become methods of that class, and all scripts within the frames associated with methods that are automatically called when that frame is reached (minus the variable and method definitions)."

    http://www.kirupa.com/forum/showthread.php?p=1914661#post1914661

    Hope this helps

    Osc23
  4. § Osc23 said on :
    This link is to a page with all the tips listed and may show up better than the long link I just posted.

    http://www.kirupa.com/forum/showthread.php?t=223798

    Sorry for posting twice ;)

    Osc23
  5. § senocular said on :
    And it works backwards for AS2 where class code is placed on the timeline during compile time in the form of #initclip (AS1 code) #endinitclip in movie clip symbols specifically created to contain each AS2 class used. The only real advantages of AS2 classes are organization, syntactical preference, and "Class" type compile time checking (which, really, aren't bad things).

    The tips Osc23 posted also go to explain the use of the prototype object in AS3 - where though it is not the primary means of inheritance, it still exists in AS3 (mirroring the inheritance chain of the class) and can still be used to assign members to a class dynamically as you could in AS1 and AS2.
  6. § Richard Leggett® Email said on :
    Very nice links, thanks guys.
  7. § subhero said on :
    nothing substantial but maybe complemental:
    something that opened my eyes to the subject "class based vs. prototype":
    http://www.zwetan.com/blog/ECMAScript/RaisingHell.html

    it is also advisable to simply read the ecma-specs or the "prototype based languages"-pdf (linked from zwetan's post).
    although it seems something changed in the as3-prototype implementation regarding inheritance. don't know exactly but got burrned by tink once about this subject ;)

    hope it's useful
    -sh
  8. § Richard Leggett® Email said on :
    Hey sh,

    Yeah I remember they changed the way inheritance and prototype lookups work. Again thanks for the link, keep them coming! :)

Comments are closed for this post.

Contact. ©2010 by Richard Leggett. blogging tool / UK hosting.
Design & icons by N.Design Studio. Skin by Tender Feelings / Evo Factory.