Ted Patrick > { Events & Community } > Adobe Systems


Flash 8 - Deprecated gets Teeth!

In prior versions of Flash "Deprecated" has encouraged developers to stop using certain methods and properties as future players may not support them. That said, many continue to be supported due to legacy of SWF content. Flash 8 player contains the first case where deprecated means not supported!&

In Flash 8, the "add" operator is no longer supported. This operator was deprecated in Flash 5, but existed until the release of Flash 8. As it is no longer supported in the Player, this may affect a very very small number of SWF files. I am not sure whether this is still available for legacy content with FP 7- headers but if you publish for Flash 8, "add" will not concatenate strings.

Not that this is a big loss, but I recall the Flash 4 days when I used "add" extensively. When "+" came along for string support I never looked back.

The lesson here is that deprecated has real meaning now and future players may well choose remove deprecated functionality for performance purposes. When you are writing content, watch the use of deprecated features. Plus not using these should be common sense by now.

Ted ;)

11 Responses to “ Flash 8 - Deprecated gets Teeth! ”

  1. # Anonymous luar

    No...I use Flash Player 8 to run the Flash Lite swf, very smooth, no problem  

  2. # Anonymous luar

    No...I use Flash Player 8 to run the Flash Lite swf, very smooth, no problem  

  3. # Anonymous Jed Wood

    "...should be common sense by now"

    Yeah, except in the detection script I use all the time, which is based on MM's (previous) official one, and uses "add." Guess I'll be forced to go through all my sites and update to their newest detection scheme *grumble*  

  4. # Blogger Ted Patrick

    I got confirmation that "add" is only deprecated when the SWF is marked with a Flash 8 header. If it is lower, it still runs in the F8 player seamlessly.

    Good News,

    ted ;)  

  5. # Anonymous Anonymous

    Too bad, I actually liked 'add' since it makes for more readable code..  

  6. # Anonymous Jed Wood

    Good to know! Thanks for finding that out.  

  7. # Anonymous Paul Neave

    Thanks for the info - do you know if any other Flash 4 deprecated syntax has been removed?

    'add' used to be useful because '+' requires extra runtime processing because it first has to discover if it's concatenating Strings or adding Numbers.  

  8. # Anonymous Derek Vadneau

    Yeah, I have to admit I never liked + for concatenation. + is a mathematical operator. I came from VB so & just makes more sense to me. Not sure why + became the standard for concatenation in ECMA. You're not actually adding strings.  

  9. # Blogger Ted Patrick

    Derek,

    Having come from the Python camp to Flash using "+" for Strings never phased me. Hopefully ECMA will take a few from Python like this:

    print( 5 * "foo!")

    Output:
    foo!foo!foo!foo!foo!

    Cheers,

    Ted ;)  

  10. # Anonymous Justin

    I also use add and +, only to differentiate between a mathimatical + and a add that joins strings together. Just makes it easier to read for me.  

  11. # Anonymous Anonymous

    wow, this took me a lot to realize...
    thanks a lot for this article... helped a lot... i just got F8 and i didnt read docs yet... so i had problems workin with "add"

    thanks :)  

Post a Comment

Jobs


Flex Jobs
city, state, zip


© 2008 Ted On Flash

Technorati Profile