<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">I suggest following the flow for singletextfield. <br><br>-Create a new config option for your case. <br><br>- In worldkitAnnotation.makeText, check if the config option is set, and only add the title to the annotation<br><br>- In worldkitAnnotation.showtext and worldkitAnnotation.hidetext, if the config option is set call your new function in worldkitInteraction.<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div><br>- In worldkitInteraction, create a new function based on worldkitInteraction.LoadingDialog.<br><br><br>This kind of structure will insure that the text box is placed correctly. <br><br>This is a pretty rough sketch, so ask any questions if you need help filling in the
details.<br><br>-Mikel<br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Mon, 05 Feb 2007 17:49:20 +0100<br>From: "mik Nix" <pampas21@hotmail.com><br>Subject: [worldKit-dev] split summary and title into separat textboxes<br> and different positions<br>To: worldkit-dev@lists.brainoff.com<br>Message-ID: <BAY123-F364397D78DB58BCC83E13FD2980@phx.gbl><br>Content-Type: text/plain; charset=iso-8859-1; format=flowed<br><br>Hi im splitting up title and summary into two separate textboxes and <br>positioning them "title" alongside the annotation marker and "summary" in <br>the bottom of the screen alongside the toolbox and this all works fine but <br>the problem now is when I zoom in the text box with the summary text gets <br>the "wrong" position. i would like to get it to stay positioned in the <br>bottom of the screen alongside the toolbar at all times like when you
use <br>the singletextfield it it is always positioned in the top of the screen and <br>the textbox with the title continue to be shown alongside the anotation mark <br>..? is this possible with 2 textboxes ?<br><br>Br.<br>/Mikael<br><br> ps. this is the code i use:<br><br> public function makeText():Void {<br> if (conf.singletextfield != true) {<br> mc.createEmptyMovieClip(textname, depth+10000); //REVISIT places 10000 <br>plot limit<br> mc[ textname ].annotation = this;<br> mc[ textname ]._visible = 0;<br><br> var w = mc.origwidth; var h = mc.origheight;<br> var textx = x; var texty = y;<br> var rescale =
(100/interact.scale);<br> var textboxsize = conf.textboxsize;<br> if (precompile) {<br> rescale = rescale * (w/conf.h);<br> textboxsize = textboxsize * (100/conf.h);<br> }<br><br> // should maybe try to position this to the right of the point, or <br>dynamically dependent on zoom)<br> if (w - x < textboxsize) { textx = x - (textboxsize / interact.scale); <br>}<br> if (h - y < 100) { texty = y - (50 / interact.scale); }<br><br> mc[ textname ]._x = textx; if (textx != x) { mc[textname].leftpos = <br>true;
}<br> mc[ textname ]._y = texty; if (texty != y) { mc[textname].bottompos = <br>true; }<br><br> mc[textname]._xscale = scale;<br> mc[textname]._yscale = scale;<br><br> if (photo != "" && photo != undefined) {<br> mc[textname].createEmptyMovieClip("image",100000); //REVISIT 100000<br> mc[textname].image.loadMovie(photo);<br> } else {<br> //var htmlText = "<font color=\"#555555\" face=\"Verdana,Arial,_sans\" <br>size=\"" + conf.textsize + "\"><b>" + title + "</b><br>" + summary + <br>"</font>";<br> var htmlText = "<font
color=\"#ffffff\" face=\"Verdana,Arial,_sans\" <br>size=\"" + conf.textsize + "\"><b>" + title + "</b></font>";<br> var textheight = 100;<br> if (conf.textboxsize != 0) {<br> mc[textname].createTextField("text",1,0,0,textboxsize,textheight);<br> mc[textname].text.html = true; //REVISIT this might be trouble with <br>non-roman chars<br> mc[textname].text.multiline = true;<br> mc[textname].text.wordWrap = true;<br> mc[textname].text.border =
true;<br> mc[textname].text.autoSize ="center";<br> mc[textname].text.background = false;<br> mc[textname].text.backgroundColor = 0xFFFFFF;<br> mc[textname].text.htmlText = htmlText;<br> //}<br><br>//------------------------------------------------------------------------------<br>var TextBox2PosW ;<br>var TextBox2PosH ;<br>var MoveBox2Right;<br>var zoomscale;<br>zoomscale = this.x<br>//TextBox2PosH = mc.origheight - mc[clipname]._y - 100<br>//TextBox2PosW = (mc.origwidth/2) - mc[clipname]._x //conf.w - (conf.w/2)// <br>mc[clipname]._x - (conf.w/2) //- this.x<br>//----------------<br>MoveBox2Right = w/2<br>TextBox2PosH = ( -
mc.origheight/20) - mc[clipname]._y + (25 )//- <br>zoomscale) // textheight<br> if (w - this.x < textboxsize) { TextBox2PosW = ( w - mc[clipname]._x - w + <br>textboxsize + MoveBox2Right); //this.x - (textboxsize / this.conf.scale);<br> }else{TextBox2PosW = ( w - mc[clipname]._x - w + MoveBox2Right) ;<br> }<br> var htmlText2 = "<font color=\"#555555\" face=\"Verdana,Arial,_sans\" <br>size=\"" + conf.textsize + "\"><b></b><br>" + summary + "</font>";<br> var textheight2 = 2;<br><br> if (this.conf.textboxsize != 0)
{<br><br> mc[textname].createTextField("text2",mc[textname].getNextHighestDepth(),TextBox2PosW <br>,TextBox2PosH,200,textheight2);<br><br> //mc[textname].createTextField("text2",mc[textname].getNextHighestDepth(),550 <br>,550,200,textheight2);<br> mc[textname].text2.html = true;<br> mc[textname].text2.multiline = true;<br> mc[textname].text2.wordWrap = true;<br> mc[textname].text2.border = true;<br> mc[textname].text2.autoSize
="center";<br> mc[textname].text2.background = true;<br> mc[textname].text2.backgroundColor = 0xffffff;<br> mc[textname].text2.htmlText = htmlText2;<br> }<br><br> }<br> //-----------------------------<br><br><br> }<br><br>_________________________________________________________________<br>V?rlden bevakas p? MSN <a target="_blank" href="http://nyheter.msn.se/">http://nyheter.msn.se/</a><br><br><br><br>------------------------------<br><br>_______________________________________________<br>worldkit-dev mailing
list<br>worldkit-dev@lists.brainoff.com<br><a target="_blank" href="http://lists.brainoff.com/listinfo.cgi/worldkit-dev-brainoff.com">http://lists.brainoff.com/listinfo.cgi/worldkit-dev-brainoff.com</a><br><br><br>End of worldkit-dev Digest, Vol 16, Issue 4<br>*******************************************<br></div></div><br></div></div></body></html>