"Non-strict equality" operator and variable conversion

This is what the language reference says:

Operators - Adobe ActionScript® 3 (AS3) API Reference
Automatic data type conversion converts the data types of String, Boolean, int, uint, and Number values to compatible types and the converted values are equal, in which case operands are considered equal.

Which basically means, if you compare a String, Boolean, int, uint, or Number when doing “==”, if they are not the same type, they will be converted before being checked.

For instance:

trace(1 == true); //true

As the language reference doesn’t go into detail:

[LIST]
[]What are the “nitty gritty” rules behind this conversion?
[
]When does it convert an int to a String and compare them, and when does it convert the String to an int and compare them?
[*]Are there cases when it makes a difference in the output if A is converted to B and vice versa?
[/LIST]