The following question came up today, so I thought I’d post the answer here in case it helps a few other people out there.
In Flex, the following code generates a couple warnings:
<mx:Script> <![CDATA[ private var i; private function init() { return true; } ]]> </mx:Script>
1008: variable ‘i’ has no type declaration.
1008: return value for function ‘init’ has no type declaration.
However, if you do the same thing in Flash CS3, you don’t get the same warnings:
var i; function init() { return true; }
If you want to see the same warnings in Flash, you can edit the EnabledWarnings.xml file in your /Configuration/ActionScript 3.0/ directory:
PC: C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\ActionScript 3.0\
Mac: /Applications/Adobe Flash CS3/Configuration/ActionScript 3.0/
Simply change the enabled attribute from false to true for the desired warnings (in this case, the warning id == 1008).
Hope that helps, and a big thanks to Nivesh for the explanation.
(Originally posted on my “other blog” at http://blogs.adobe.com/pdehaan/)
{ 0 comments… add one now }