Random Flash Movie

1. Senior Member
Join Date
Dec 1969
Posts
936

## Random Flash Movie

I have the following code that selects a random swf movie. Is this the best way of doing this?<BR><BR>Thanks,<BR>Jamie<BR><BR>&#060;%<BR><B R> intLowerBound = 0<BR> intUpperBound = 6<BR><BR>Randomize()<BR><BR>&#039; Find range size<BR>intRangeSize = intUpperBound - intLowerBound + 1<BR><BR>&#039; Get a random number from 0 to the size of the range<BR>sngRandomValue = intRangeSize * Rnd()<BR><BR>&#039; Center the range of possible random numbers over the desired result set<BR>sngRandomValue = sngRandomValue + intLowerBound<BR><BR>&#039; Convert our value to an integer<BR>intRandomInteger = Int(sngRandomValue)<BR><BR>&#039;Response.Write "You asked for a random number between &#060;B&#062;" & intLowerBound & "&#060;/B&#062; and &#060;B&#062;" & intUpperBound & "&#060;/B&#062;.<BR>"<BR>&#039;Response.Write "The computer returned: &#060;B&#062;" & intRandomInteger & "&#060;/B&#062;<BR>"<BR><BR>Select Case intRandomInteger<BR><BR>Case 0<BR> Tune = "http://www.s-o-m-e-s-i-t-e.com/00.swf"<BR>Case 1<BR> Tune = "http://www.s-o-m-e-s-i-t-e.com/01.swf"<BR>Case 2<BR> Tune = "http://www.s-o-m-e-s-i-t-e.com/02.swf"<BR>Case 3<BR> Tune = "http://www.s-o-m-e-s-i-t-e.com/03.swf"<BR>Case 4<BR> Tune = "http://www.s-o-m-e-s-i-t-e.com/04.swf"<BR>Case 5<BR> Tune = "http://www.s-o-m-e-s-i-t-e.com/05.swf"<BR>Case 6<BR> Tune = "http://www.s-o-m-e-s-i-t-e.com/06.swf"<BR>End Select<BR><BR> &#039;Response.Write Tune <BR><BR>%&#062;<BR><BR>&#060;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="98" height="88"&#062;<BR> &#060;param name=movie value="&#060;%=Tune%&#062;"&#062;<BR> &#060;param name=quality value=high&#062;<BR> &#060;embed src="&#060;%=Tune%&#062;" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="98" height="88"&#062;<BR> &#060;/embed&#062; <BR> &#060;/object&#062;<BR>

2. Senior Member
Join Date
Dec 1969
Location
Indianapolis, IN
Posts
1,755

## Looks fine to me...

provided that all Flash movies are the same height and width (or look okay at the universal height and width you have chosen).

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•