Flash 8 - Deprecated gets Teeth!
DIGG IT!
11
Comments
Published
Wednesday, August 24, 2005
at
11:04 PM
.
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 ;)
No...I use Flash Player 8 to run the Flash Lite swf, very smooth, no problem
No...I use Flash Player 8 to run the Flash Lite swf, very smooth, no problem
"...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*
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 ;)
Too bad, I actually liked 'add' since it makes for more readable code..
Good to know! Thanks for finding that out.
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.
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.
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 ;)
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.
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 :)