<HTML dir=ltr><HEAD><TITLE>Trying to overlay a grid for positioning in Xerte 2.10</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.17023" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText73098 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>you could do </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>rootIcon.createEmptyMovieClip('gridlines', someBigDepthNumber);</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>and then draw into that clip - then it always be above anything, even the root entry frame,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>J</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on behalf of Paul Swanson<BR><B>Sent:</B> Wed 07/04/2010 17:24<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B> [Xerte] Trying to overlay a grid for positioning in Xerte 2.10<BR></FONT><BR></DIV>
<DIV>
<P dir=ltr><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>I</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>m working on a routine to create gridlines to assist in positioning</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Calibri>some rectangles that I draw with code. I</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>ve got the gridlines working, but they end up under</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> the framework for the individual lessons and I need them on top. Here</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>s the approach I</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>m using:</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face=Calibri>I have a flag variable to turn it on and off in my setup script, and the</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> graphic icon I draw it on, and the</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> code to draw the gridlines</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>,</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Calibri>are</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> in</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Calibri>the</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> main</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Calibri>entry frame of the interface icon. This works until I enter another framework</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>, at which point the other framework sits on top of my gridlines. I</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>ve tried using swapDepths with a numeric value of 10000, which should be higher than</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> the depth of any other icon, and I</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>ve also tried using the id of the framework</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> in place of the numeric value.</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> I</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>ve even moved the code</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Calibri>to the page where I draw the rectangle, and used the icon id of the</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Calibri>screen shot graphic</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> with swapDepths</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>, but it always appears under the framework.</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> Anyone have any idea?</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> </SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face=Calibri>More details:</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face=Calibri>Setup script has:</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face="Lucida Console" size=2>gri</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face="Lucida Console" size=2>dL</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face="Lucida Console" size=2>ines</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face="Lucida Console" size=2> = true; // set t</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face="Lucida Console" size=2>o false to turn off</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face=Calibri>In Interface icon Entry Frame I have a graphic icon with an ID of</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Calibri>‘</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>grid</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face=Calibri>Script icon that draw gridlines</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Calibri>has following code:</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face="Lucida Console" size=2>if (gridLines) {</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> // set grid to high depth</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> grid.swapDepths(10000);</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> // grid line intervals</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> gridInterval = 50;</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> grid.lineStyle(1,0x000000,100);</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> // vertical grids</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> for (gridX = 0; gridX <= stageWidth; gridX) {</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> grid.moveTo(gridX, 0);</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> grid.lineTo(gridX, stageHeight);</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> gridX = gridX + gridInterval;</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> }</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> </FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> // horizontal grids</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> for (gridY = 0; gridY <= stageHeight; gridY) {</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> grid.moveTo(0, gridY);</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> grid.lineTo(stageWidth, gridY);</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> gridY = gridY + gridInterval;</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2> }</FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us><FONT face="Lucida Console" size=2>}</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN></P>
<P dir=ltr><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN></P>
<P dir=ltr><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face="Courier New" color=#808080 size=2>_____________________________</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face="Times New Roman"> </FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri color=#808080 size=2> </FONT><FONT face="Courier New" color=#808080 size=2>Paul Swanson</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri><BR></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri color=#808080 size=2> </FONT><FONT face="Courier New" color=#808080 size=2>Instructional Designer</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri><BR></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri color=#808080 size=2> </FONT><FONT face="Courier New" color=#808080 size=2>Harland Financial Solutions</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri><BR></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri color=#808080 size=2> </FONT><FONT face="Courier New" color=#808080 size=2>800.274.7280 Ext. 2462</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri><BR></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri color=#808080 size=2> </FONT><FONT face="Courier New" color=#808080 size=2>Paul.Swanson@harlandfs.com</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri><BR></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face="Courier New" color=#808080 size=2>_____________________________</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Calibri> </FONT></SPAN></P>
<P dir=ltr><SPAN lang=en-us></SPAN></P></DIV></BODY></HTML>