This is a migrated thread and some comments may be shown as answers.

Media won't run a second time

2 Answers 20 Views
Window
This is a migrated thread and some comments may be shown as answers.
Clive Hoggar
Top achievements
Rank 1
Clive Hoggar asked on 08 Dec 2009, 03:53 PM
Hi
I have a flash video control on a page running in a window, set to autplay on page load.
This works fine, and starts when the window is opened.

I order to ensure the media does not keep playing when the window is closed I have this
script (from Telerik):
<script type="text/javascript">    
    function ShowWindow(oWnd) {    
        oWnd.add_close(OnClientClose); //set a function to be called when RadWindow is closed     
    }    
    function OnClientClose(oWnd) {    
        oWnd.setUrl("about:blank"); // Sets url to blank     
    }         
</script> 

However this also seems to ensure that the media does not play if the window is called again,
unless the parent page is refreshed by the visitor.

How can I get round this?

Thanks

Clive

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 09 Dec 2009, 08:16 AM
Hi Clive,

Try setting the DestroyOnClose property of RadWindow to "True" rather than setting the url to blank, and see whether it is working fine as expected.

-Shinu.
0
Clive Hoggar
Top achievements
Rank 1
answered on 09 Dec 2009, 12:26 PM
Hi Shinu

I tried that but it prevented the window re-opening at all.

I found a solution though:
- I set the url on close to be the same as that on opening
- set the video to not autoplay:
- Set the animation to none, so that you can't see a short flash as the movie is reset before 
the transition was complete.

That's it

Clive
 
Tags
Window
Asked by
Clive Hoggar
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Clive Hoggar
Top achievements
Rank 1
Share this question
or