showlog();
set(schp_name,%2);
set(hotspot[get(schp_name)].type,'text');
set(hotspot[get(schp_name)].ath,%4);
set(hotspot[get(schp_name)].atv,%5);
set(hotspot[get(schp_name)].hotspottitle,%3);
set(hotspot[get(schp_name)].wordcontent,%9);
set(hotspot[get(schp_name)].hotspotlink,%8);
set(hotspot[get(schp_name)].alpha,1);
set(hotspot[get(schp_name)].scale,1);
set(hotspot[get(schp_name)].autoalpha,false);
set(hotspot[get(schp_name)].distorted,false);
set(hotspot[get(schp_name)].width, 1);
set(hotspot[get(schp_name)].height,70);
set(hotspot[get(schp_name)].visible,true);
addhotspot(get(schp_name));
set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
if(%7 == false,
,
set(hotspot[get(schp_name)].ondown,draghotspot1(););
set(hotspot[get(schp_name)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(name),get(ath),get(atv),"imgtext")));
);
txtadd(hotspot[get(schp_name)].onloaded,"add_all_2_tooltip();");
set(hotspot[get(schp_name)].onhover,null);
set(hotspot[get(schp_name)].onout,null);
set(hotspot[get(schp_name)].onover,null);
txtadd(tooltipname2, 'tooltip2_', get(name));
set(toolP,get(name));
trace('parentName::',get(name));
addlayer(get(tooltipname2));
txtadd(layer[get(tooltipname2)].parent, 'hotspot[', get(name), ']');
set(layer[get(tooltipname2)].autowidth, true);
set(layer[get(tooltipname2)].width,'prop');
set(layer[get(tooltipname2)].height,30);
set(layer[get(tooltipname2)].edge,ce);
set(layer[get(tooltipname2)].background,false);
set(layer[get(tooltipname2)].x,0);
set(layer[get(tooltipname2)].y,-50);
set(layer[get(tooltipname2)].padding,0);
set(layer[get(tooltipname2)].type,'html');
set(layer[get(tooltipname2)].url,'%SWFPATH%/plugins/textfield.swf');
set(layer[get(tooltipname2)].border,false);
set(layer[get(tooltipname2)].align,center);
set(layer[get(tooltipname2)].ath,0);
set(layer[get(tooltipname2)].atv,0);
trace(get(name),'--ath::',get(hotspot[get(name)].ath));
trace(get(name),'--atv::',get(hotspot[get(name)].atv));
set(layer[get(tooltipname2)].ondown,'draglayer();');
txtadd(labelCode, '','
',get(hotspottitle),'
');
copy(layer[get(tooltipname2)].html, labelCode)
txtadd(hsName, '', get(name));
txtreplace(hsName, 'tooltip2_', '');
copy(drag_currentx, x);
copy(drag_currenty, y);
copy(drag_stagex, mouse.stagex);
copy(drag_stagey, mouse.stagey);
indexoftxt(align_contains_right, get(align), 'right');
indexoftxt(align_contains_bottom, get(align), 'bottom');
calc(drag_align_x, align_contains_right GE 0 ? -1 : +1);
calc(drag_align_y, align_contains_bottom GE 0 ? -1 : +1);
copy(hx, hotspot[get(hsName)].x);
copy(hy, hotspot[get(hsName)].y);
asyncloop(
pressed,
calc(x, drag_currentx + (mouse.stagex - drag_stagex) * drag_align_x);
calc(y, drag_currenty + (mouse.stagey - drag_stagey) * drag_align_y);
);
spheretoscreen(ath, atv, hotspotcenterx, hotspotcentery, 'l');
sub(drag_adjustx,mouse.stagex, hotspotcenterx);
sub(drag_adjusty,mouse.stagey, hotspotcentery);
asyncloop(
pressed,
sub(x, mouse.stagex, drag_adjustx);
sub(y, mouse.stagey, drag_adjusty);
screentosphere(x, y, ath, atv);
trace('draghotspot1-callout::','ath::',ath,'atv::',atv);
);