Deprecated syntax in Flash 8
There has been a growing number of questions in the forum about certain code not working in Flash 8. Most of the time its due to the use of deprecated, or no longer supported syntax. Below is a list of functions, operators, properties and classes that are deprecated. Please note, that if you wish to publish for Flash 4 or 5, you must use the deprecated code and NOT the replacements.
Operators
<> replaced wtih !=
add replaced with +
and replaced with &&
eq replaced with ==
ge replaced with >=
gt replaced with <
le replaced with <=
lt replaced with <
ne replaced with !=
not replaced wtih !
or replaced with ||
Properties
_highquality replaced with _quality
maxscroll replaced with TextField.maxscroll
scroll replaced with TextField.scroll
Functions
TextFormat.getTextExtent() no replacement
ifFrameLoaded() recommended that you use _framesloaded
call() replaced with function
chr() replaced with string.fromCharCode()
int() replaced with Math.round()
length() replaced with string.length
mbchr() replaced with String.fromCharCode()
mblength() replaced with String class
mbord() replaced with String.charCodeAt()
mbsubstring() replaced with String.substr()
ord replaced with String class
random() replaced with math.random
substring() replaced with string.substr()
tellTarget() replaced with DOT(.) notation
toggleHighQuality() replaced with _quality
Classes
color replaced with flash.geom.ColorTransform class