Were getting offtopic (like usual
) so I will try to make it short.
Dwedit wrote:
Or use Haxe to do actionscript, which throws tons of compiler errors at you long before you get your first runtime error.
We were stuck with some requirements that forced us to use AS2.0 and some specific tools because of some 3rd party dependencies and the design company. After this "experience", I will never want to do flash for work and even less for hobby: I won't burn myself twice
I'm still stuck to maintain (for now) that multi-language interface duplicated in N amount of swf files...
tepples wrote:
Dwedit wrote:
Actionscript though has it's own crazy set of quirks.
The Assignment (=) operator either copies something if it's a 'small' type (boolean, number, string), or creates a reference if it's a 'big' type (array, object, movie clip, etc).
Java does the same thing, and so does Python. To make a copy, you
clone() the object in Java, or you can use a copy constructor or the
copy module in Python.
I missed that comment and will add to it. What you're talking about is about value types (small type) or reference type (big type). A Reference type when using the = sign does only a shallow copy (i.e. only the reference is copied). This is common in most high level programming languages (java like tepple said, c# etc). In those case you have to make a way to to do a deep copy, not just the references. In action script, when you have this case you have to put on your object your own method to clone/deep copy it.