hi, how you load a random swf from code behind?
html
Code:<Bewise:FlashControl ID="bannerflashcontrol" runat="server" Height="245px" MovieUrl="<%=rand_banner %>" Width="707px" loop="true" />
vb
Thanks.Code:Public Function rand_banner() As String Dim banner_arr() As String = New String() {"~/images/banner1.swf", "~/images/banner2.swf", "~/images/banner3.swf"} Dim i As Integer = a.RandomNumber(0, 2) 'call class helper to generate random num(min, max) Return banner_arr(i).ToString End Function





Reply With Quote