<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
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
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Trebuchet MS","sans-serif";
        color:#595959;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple style='word-wrap: break-word;
-webkit-nbsp-mode: space;-webkit-line-break: after-white-space'>
<div class=Section1>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>I’m
having a problem sorting some viewport layers. Two of the layers in the code
below, menuPlaneLayer and gameBoardLayer sort fine, but the one that contains
the Collada file (gameComponentsLayer) does not – it appears behind
everything. What am I doing wrong?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>var
testColladaMaterialsList:MaterialsList = new MaterialsList();<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>testColladaMaterialsList.addMaterial
( new ColorMaterial ( 0xD3C8AD), "ERDefaultMaterial"); <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>var
testCollada:Collada = new
Collada("assets/componentmodels/testmodel1/testmodel1.dae",
testColladaMaterialsList);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>testCollada.rotationX
= -90;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>testCollada.z
= -100;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>_gameComponents.addChild(testCollada);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>//Create
gameboard plane<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>var
planeMaterial:ColorMaterial = new ColorMaterial(0x); <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>planeMaterial.doubleSided
= true;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>_gameboard
= new Plane(planeMaterial, 500, 400, 3, 3);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>_gameboard.addChild(_gameComponents);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>_gameboard.rotationX
= 70;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>//separate
and sort layers for proper clipping:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>var
menuPlaneLayer:ViewportLayer = _viewport.getChildLayer(_menuPlane);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>var
gameboardLayer:ViewportLayer = _viewport.getChildLayer(_gameboard);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>var
gameComponentsLayer:ViewportLayer = _viewport.getChildLayer(_gameComponents);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>menuPlaneLayer.layerIndex
= 1;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>gameboardLayer.layerIndex
= 2;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>gameComponentsLayer.layerIndex
= 3;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>_viewport.containerSprite.sortMode
= ViewportLayerSortMode.INDEX_SORT;<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>_scene.addChild(_gameboard);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#595959'>Thanks
for any advice,<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal style='text-autospace:none'><b><font size=1 color="#76923c"
face="Trebuchet MS"><span style='font-size:9.0pt;font-family:"Trebuchet MS","sans-serif";
color:#76923C;font-weight:bold'><o:p> </o:p></span></font></b></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=1 color="#76923c"
face="Trebuchet MS"><span style='font-size:9.0pt;font-family:"Trebuchet MS","sans-serif";
color:#76923C;font-weight:bold'>Jason Merrill</span></font></b><font size=1
color="#365f91" face="Trebuchet MS"><span style='font-size:8.0pt;font-family:
"Trebuchet MS","sans-serif";color:#365F91'> <br>
<br>
<o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><b><font size=1 color="#0052c2"
face=Arial><span style='font-size:8.0pt;font-family:"Arial","sans-serif";
color:#0052C2;font-weight:bold'>Bank of America</span></font></b><font
size=1 color="#365f91" face="Trebuchet MS"><span style='font-size:8.0pt;
font-family:"Trebuchet MS","sans-serif";color:#365F91'> </span></font><b><font
size=1 color="#d1001d" face=Tahoma><span style='font-size:8.0pt;font-family:
"Tahoma","sans-serif";color:#D1001D;font-weight:bold'><img width=17 height=14
id="Picture_x0020_1" src="cid:image001.jpg@01C9FBAC.32343A00" alt=smallLogo></span></font></b><font
size=1 color="#595959" face="Trebuchet MS"><span style='font-size:8.0pt;
font-family:"Trebuchet MS","sans-serif";color:#595959'> </span></font><font
size=1 color="#595959" face="Trebuchet MS"><span style='font-size:8.0pt;
font-family:"Trebuchet MS","sans-serif";color:#595959'>Global Learning <o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 color="#595959"
face="Trebuchet MS"><span style='font-size:8.0pt;font-family:"Trebuchet MS","sans-serif";
color:#595959'>Shared Services Solutions Development <o:p></o:p></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=1 color="#595959"
face="Trebuchet MS"><span style='font-size:8.0pt;font-family:"Trebuchet MS","sans-serif";
color:#595959'><br>
</span></font><i><font size=1 color="#7f7f7f" face="Trebuchet MS"><span
style='font-size:9.0pt;font-family:"Trebuchet MS","sans-serif";color:#7F7F7F;
font-style:italic'>Monthly meetings on the Adobe Flash platform for rich media
experiences - join the </span></font></i><i><font size=1 color="#548dd4"
face="Trebuchet MS"><span style='font-size:9.0pt;font-family:"Trebuchet MS","sans-serif";
color:#548DD4;font-style:italic'><a
href="http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx"><font
color="#548dd4"><span style='color:#548DD4'>Bank of America Flash Platform
Community</span></font></a></span></font></i><i><font size=1 color="#7f7f7f"
face="Trebuchet MS"><span style='font-size:9.0pt;font-family:"Trebuchet MS","sans-serif";
color:#7F7F7F;font-style:italic'> </span></font></i><font size=1 color="#595959"
face="Trebuchet MS"><span style='font-size:8.0pt;font-family:"Trebuchet MS","sans-serif";
color:#595959'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face=Calibri><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#595959'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color="#595959" face=Calibri><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#595959'><o:p> </o:p></span></font></p>
</div>
</div>
</body>
</html>