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.

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

}<br />

}<br />

case "rRed":<br />

inAnim = true;<br />

currentUserCol=2;<br />

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

break;<br />

}<br />

// Sample event h<strong>and</strong>ler<br />

function addToMoves()<br />

{<br />

currentMove++;<br />

theMoves[currentMove] = Math.floor(Math.r<strong>and</strong>om()*4);<br />

slControl.content.findName("txtRound").Text = "Round " + (currentMove+1);<br />

}<br />

function playMoves()<br />

{<br />

currentFrame=-1;<br />

inMovesPlayBack = true;<br />

doNextFrame();<br />

}<br />

function doNextFrame()<br />

{<br />

currentFrame++;<br />

if(currentFrame

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

Saved successfully!

Ooh no, something went wrong!