this.selPosition=getSelectionPosition(); this.selSize=getSelectionSize(); if ($debug) Debug.write("customInputtext onFocus : ", canvas.isrtl); if(canvas.isrtl == 'true'){ if ($debug) Debug.write("customInputtext onFocus : RTL is set"); this.setAttribute('textalign', 'right'); } else{ if ($debug) Debug.write("customInputtext onFocus : RTL is NOT set"); this.setAttribute('textalign', 'left'); } =0x80 && t.charCodeAt(i)<=0xBF) || (cp1252[t.charCodeAt(i)])) && i>0) { //if ($debug) Debug.write("DO WHILE -2- ",t.charCodeAt(i),cp1252[t.charCodeAt(i)],i); if (cp1252[t.charCodeAt(i)]) { t=t.substr(0,i)+String.fromCharCode(cp1252[t.charCodeAt(i)])+t.substr(i+1); } i--; } if (i==d) { //if ($debug) Debug.write("i == d NOTHING TO REPLACE!"); return; } var u=0; if (t.charCodeAt(i)>=0xC2 && t.charCodeAt(i)<=0xDF && d-i==1) { // two-byte sequence u= (t.charCodeAt(i+1) & 0x3F) + ((t.charCodeAt(i ) & 3 ) << 6) + ((t.charCodeAt(i ) & 0x1C) << 6); } else if (t.charCodeAt(i)>=0xE0 && t.charCodeAt(i)<=0xEF && d-i==2) { // three-byte sequence // (Flash Player doesn't cope with any more obscure Unicode) u= (t.charCodeAt(i+2) & 0x3F) + ((t.charCodeAt(i+1) & 3 ) << 6 ) + ((t.charCodeAt(i+1) & 0x3C) << 6 ) + ((t.charCodeAt(i ) & 0x0F) << 12); } if (u!=0) { //if ($debug) Debug.write("Replace String -1- ",txt,u,"Replace With ",String.fromCharCode(u)); this.setAttribute("text",t.slice(0,i)+String.fromCharCode(u)+t.slice(d+1)); //if ($debug) Debug.write("Replace String -2- ",txt,u); this.setAttribute("text",this.text.split(String.fromCharCode(0x03)).join('')); } //if ($debug) Debug.write("-- END ",this.text); ]]>