Flash V2组件基础件开发:ActionRegistry消息分派器。(3) else trace ("the listener not implement "+type+" handle"); } } else { trace ("action "+type+" no listeners"); } }
function set action (str:String) : Void { if (str != undefined) { var delimiter_pos = str.indexOf (":"); if (delimiter_pos > 0) { var action_type = str.substr (0, delimiter_pos); var action_body = str.substr (delimiter_pos+1); if (action_type.length > 0) { //trace ("call listeners handler of action {"+action_type+"}"); var args = parse_body (action_type, action_body);