This project is read-only.

How to change Transition Speed and Effects at runtime

Feb 9, 2009 at 7:30 AM
I would like to modify the Slide.Show2 project, so as to add a Textbox for entering the time interval between two images in a Album and an option to change the Transition effects at runtime. Any ideas ??
Feb 9, 2009 at 11:59 PM
The transition effects can be set at runtime by creating an httpHandler that generates the appropriate album xml at runtime... this is one that I made... notice this line writer.WriteAttributeString("transition", _Transition)   

    ''' <summary>  
    ''' Slide Show HttpHandler (SlideShowData.xml)  
    ''' </summary>  
    Friend Class SlideShowData : Implements IHttpHandler  
        ''' [ Methods ]  
        Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest  
            context.Response.Buffer = False 
            Dim _AlbumID As Integer = context.Request.QueryString("ID")  
            Using writer As New XmlTextWriter(context.Response.Output)  
                Dim SlideShowDC As New SlideShowDataContext  
                Dim r = SlideShowDC.GetSlideShowImages(_AlbumID).ToList  
                writer.Formatting = Formatting.Indented  
                writer.WriteAttributeString("transition", _Transition)  
                For Each record As Object In r  
                    writer.WriteAttributeString("title", record.Title)  
                    writer.WriteAttributeString("thumbnail", record.Path)  
                    writer.WriteAttributeString("source", record.Path)  
                    writer.WriteAttributeString("description", record.Description)  
            End Using  
        End Sub  
        ''' [ Properties ]  
        Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable  
                Return False 
            End Get 
        End Property 
        Protected Shared _Transition As String = SlideShowPlayer._Transition   
    End Class 

As for changing the speed... sorry but I have not gotten that far.

You can see my blog post on setting Slide.Show2 settings via a database at it might help you with some of your ideas.
Feb 10, 2009 at 4:52 AM