         var tOffset:Number = getStyle("dataTipOffset");
 
         // If the layoutDirection is rtl, swap left and right placement
-        if (layoutDirection == "rtl")   
+        if (layoutDirection == LayoutDirection.RTL)   
         {
             if (tPlacement == "left")
                 tPlacement = "right";

            }
        }
        
        if (layoutDirection == "rtl")
            relX += dataTip.width;
        
        var o:Point = new Point(relX, relY);


import mx.core.IFlexDisplayObject;
import mx.core.IUIComponent;
import mx.core.LayoutDirection;
import mx.core.UIComponent;
import mx.core.mx_internal;
import mx.effects.Tween;
