08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

412<br />

CHAPTER 16 ■ PROGRAMMING SILVERLIGHT WITH XAML AND JAVASCRIPT<br />

slControl.content.findName("LightUpYellow").Begin();<br />

break;<br />

}<br />

}<br />

else<br />

{<br />

inMovesPlayBack = false<br />

}<br />

}<br />

function h<strong>and</strong>leAnimComplete()<br />

{<br />

if(inMovesPlayBack)<br />

{<br />

doNextFrame();<br />

}<br />

else<br />

{<br />

if(currentUserCol == theMoves[currentUserMove])<br />

{<br />

// We can keep going<br />

if(currentUserMove>=currentMove)<br />

{<br />

gameloop();<br />

}<br />

}<br />

else<br />

{<br />

// We hit an error -- game OVER<br />

gameOver();<br />

}<br />

}<br />

inAnim=false;<br />

}<br />

function setUpEventH<strong>and</strong>lers()<br />

{<br />

slControl.content.findName("rBlue").addEventListener("MouseLeftButtonDown",<br />

h<strong>and</strong>leMouseDown);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!