<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>
<STYLE>
<!--
font-face
        {font-family:"Cambria Math";}
font-face
        {font-family:Calibri;}
font-face
        {font-family:Tahoma;}
font-face
        {font-family:"Lucida Console";}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {
        color:purple;
        text-decoration:underline;}
p
        {
        margin-right:0in;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {
        font-family:"Calibri","sans-serif";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle19
        {
        font-family:"Calibri","sans-serif";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {
        font-size:10.0pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV id=idOWAReplyText26133 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>can you debug(rootIcon.grid) afterwards?</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 21:32<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] Trying to overlay a grid for positioning in Xerte 2.10<BR></FONT><BR></DIV>
<DIV>
<DIV class=Section1>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Unfortunately, that didn’t work. I also tried _root and _level0. I’m not sure it created the empty movie clip. The code I used was:</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'">// Grid Lines routine</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'">// Set gridLines to true to display grid lines for positioning.</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'">// Be sure to set it to false before publishing</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'">gridLines = true;</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'">if (gridLines) {</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> // create empty movie clip to draw grid on</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> rootIcon.createEmptyMovieClip('grid', 10000);</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> // size of grid cells</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> gridSize = 50;</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> </SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> // style of grid lines (line width, line color, line opacity)</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> grid.lineStyle(1, 0x000000, 100);</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> // vertical grids</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> for (gridX = gridSize; gridX < stageWidth; gridX) {</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> grid.moveTo(gridX, 0);</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> grid.lineTo(gridX, stageHeight);</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> gridX = gridX + gridSize;</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> }</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> </SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> // horizontal grids</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> for (gridY = gridSize; gridY < stageHeight; gridY) {</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> grid.moveTo(0, gridY);</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> grid.lineTo(stageWidth, gridY);</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> gridY = gridY + gridSize;</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> }</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"> </SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'">}</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Lucida Console'"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">It works if I use a graphic icon with an id of ‘grid’ and comment out the createEmptyMovieClip line, and I’m fine with that.</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Paul</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<DIV>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<P class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> xerte-bounces@lists.nottingham.ac.uk [mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Paul Swanson<BR><B>Sent:</B> Wednesday, April 07, 2010 11:18 AM<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] Trying to overlay a grid for positioning in Xerte 2.10</SPAN></P></DIV></DIV>
<P class=MsoNormal> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Ahhhh, then I could do the whole routine in the setup script. That sounds like the best way to go. I’ll play with that and let you know how it goes.</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Thanks, Jules!</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"></SPAN> </P>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: blue 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<DIV>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<P class=MsoNormal><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> xerte-bounces@lists.nottingham.ac.uk [mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Julian Tenney<BR><B>Sent:</B> Wednesday, April 07, 2010 11:05 AM<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] Trying to overlay a grid for positioning in Xerte 2.10</SPAN></P></DIV></DIV>
<P class=MsoNormal> </P>
<DIV id=idOWAReplyText73098>
<DIV>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">you could do </SPAN></P></DIV>
<DIV>
<P class=MsoNormal> </P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">rootIcon.createEmptyMovieClip('gridlines', someBigDepthNumber);</SPAN></P></DIV>
<DIV>
<P class=MsoNormal> </P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">and then draw into that clip - then it always be above anything, even the root entry frame,</SPAN></P></DIV>
<DIV>
<P class=MsoNormal> </P></DIV>
<DIV>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">J</SPAN></P></DIV></DIV>
<DIV>
<P class=MsoNormal> </P>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center>
<HR align=center width="100%" SIZE=2>
</DIV>
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> 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</SPAN></P></DIV>
<DIV>
<P><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">I’m working on a routine to create gridlines to assist in positioning</SPAN> <SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">some rectangles that I draw with code. I’ve got the gridlines working, but they end up under the framework for the individual lessons and I need them on top. Here’s the approach I’m using:</SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">I have a flag variable to turn it on and off in my setup script, and the graphic icon I draw it on, and the code to draw the gridlines,</SPAN> <SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">are in</SPAN> <SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">the main</SPAN> <SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">entry frame of the interface icon. This works until I enter another framework, at which point the other framework sits on top of my gridlines. I’ve tried using swapDepths with a numeric value of 10000, which should be higher than the depth of any other icon, and I’ve also tried using the id of the framework in place of the numeric value. I’ve even moved the code</SPAN> <SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">to the page where I draw the rectangle, and used the icon id of the</SPAN> <SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">screen shot graphic with swapDepths, but it always appears under the framework. Anyone have any idea?</SPAN> </P>
<P><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">More details:</SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">Setup script has:</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">gridLines = true; // set to false to turn off</SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">In Interface icon Entry Frame I have a graphic icon with an ID of</SPAN> <SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">‘grid’</SPAN></P>
<P><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">Script icon that draw gridlines</SPAN> <SPAN style="FONT-FAMILY: 'Calibri','sans-serif'">has following code:</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">if (gridLines) {</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> // set grid to high depth</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> grid.swapDepths(10000);</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> // grid line intervals</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> gridInterval = 50;</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> grid.lineStyle(1,0x000000,100);</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> // vertical grids</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> for (gridX = 0; gridX <= stageWidth; gridX) {</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> grid.moveTo(gridX, 0);</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> grid.lineTo(gridX, stageHeight);</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> gridX = gridX + gridInterval;</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> }</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> </SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> // horizontal grids</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> for (gridY = 0; gridY <= stageHeight; gridY) {</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> grid.moveTo(0, gridY);</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> grid.lineTo(stageWidth, gridY);</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> gridY = gridY + gridInterval;</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'"> }</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Lucida Console'">}</SPAN></P>
<P><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'">_____________________________</SPAN> </P>
<P><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Calibri','sans-serif'"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'">Paul Swanson</SPAN><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Calibri','sans-serif'"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'">Instructional Designer</SPAN><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Calibri','sans-serif'"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'">Harland Financial Solutions</SPAN><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Calibri','sans-serif'"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'">800.274.7280 Ext. 2462</SPAN><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Calibri','sans-serif'"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'">Paul.Swanson@harlandfs.com</SPAN><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'">_____________________________</SPAN><SPAN style="FONT-FAMILY: 'Calibri','sans-serif'"> </SPAN></P></DIV></DIV></DIV></DIV></DIV></BODY></HTML>