Toggling specific compiler warnings in Flash CS3
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 peter() {
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.
Comments
Thanks, Peter. Was this done in an attempt to make Flash CS3 (and thus AS3) more timeline coding friendly for those adapting from AS2? I ask because I'd argue that it might be doing the opposite.
Posted by: Jon MacDonald | February 4, 2008 04:13 PM
Hi Peter,
Can you please tell me if it is impossible to embed fonts into a DataGrid HeaderRenderer (in Flash CS3 as AS3)?
I can't suss it and it's driving me mad...
Should i create a custom HeaderRenderer as a work around?
If so have you got any tutorials i could see?
Cheers
Doug
Posted by: Doug Gray | February 9, 2008 01:58 PM
Doug,
Yeah, it was a bit tricky, but check out "Using embedded fonts with the Flash CS3 DataGrid component".
Hope that helps,
Peter
Posted by: peterd | February 12, 2008 11:00 AM