class cls_tooltips { private var tt_target_2s; //目标按钮 private var tt_bgcolor_2s; //背景色 private var tt_bordercolor_2s; //边框色 private var tt_borderthick_2s; //边框粗细 private var tt_borderalpha_2s; //边框透明度 private var tt_fillet_2s; //是否圆角 private var tt_text_2s; //文本 private var tt_width_2s; //宽 private var tt_height_2s; //高 private var tt_angle_2s; //圆角角度 private var tt_dir_2s; //圆角角度 function cls_tooltips(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) { tt_target_2s = param1; tt_fillet_2s = param2; tt_bgcolor_2s = param3; tt_bordercolor_2s = param4; tt_borderthick_2s = param5; tt_borderalpha_2s = param6; tt_text_2s = param7; tt_width_2s = param8; tt_height_2s = param9; tt_angle_2s = param10; tt_dir_2s = param11; tt_draw_2s(); } private function tt_draw_2s() { var temp_fillet = tt_fillet_2s; var temp_bgcolor = tt_bgcolor_2s; var temp_bordercolor = tt_bordercolor_2s; var temp_borderthick = tt_borderthick_2s; var temp_borderalpha = tt_borderalpha_2s; var temp_text = tt_text_2s; var temp_width = tt_width_2s; var temp_height = tt_height_2s; var temp_angle = tt_angle_2s; var temp_dir = tt_dir_2s; tt_target_2s.onRollOver = function() { _root.createEmptyMovieClip("tt_clip_2s", _root.getNextHighestDepth()); with (_root.tt_clip_2s) { _visible = false; lineStyle(temp_borderthick, temp_bordercolor, temp_borderalpha); beginFill(temp_bgcolor); moveTo(0, 0); if (temp_fillet == false) { curveTo(0, 0, temp_width, 0); curveTo(temp_width, 0, temp_width, temp_height); curveTo(temp_width, temp_height, 0, temp_height); curveTo(0, temp_height, 0, 0); } else if (temp_fillet == true) { curveTo(0, -(temp_angle), (2*temp_angle), -(temp_angle)); lineTo((temp_width-(2*temp_angle)), -(temp_angle)); curveTo(temp_width, -(temp_angle), temp_width, 0); lineTo(temp_width, temp_height-temp_angle); curveTo(temp_width, temp_height, (temp_width-(2*temp_angle)), temp_height); lineTo(temp_angle, temp_height); curveTo(0, temp_height, 0, temp_height-temp_angle); } createTextField("tt_text", tt_text.getNextHighestDepth(), 3, 0, 0, 0); tt_text.autoSize = "left"; tt_text.multiline = true; tt_text.html = true; tt_text.htmlText = temp_text; endFill(); this.onEnterFrame = function() { _visible = true; if (temp_dir == false) { _root.tt_clip_2s._x = _root._xmouse+15; _root.tt_clip_2s._y = _root._ymouse+15; } else if (temp_dir == true) { _root.tt_clip_2s._x = _root._xmouse-temp_width-10; _root.tt_clip_2s._y = _root._ymouse-temp_height-10; } }; } }; tt_target_2s.onRollOut = function() { delete this.onEnterFrame; removeMovieClip(_root.tt_clip_2s); }; tt_target_2s.onReleaseOutside = function() { delete this.onEnterFrame; removeMovieClip(_root.tt_clip_2s); }; } }