Try
http://www.interactivebusinessplanner.com/default2.aspxWhen I use your control's javascript API to play/stop the video, other stuff gets messed up depending the browser I use. In Firefox and IE: The action of the continue button would not be rendered at all. In Chrome: The ajax htmleditor would not be rendered properly.
Below, the final version of the aspx:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="cc1" %>
<%@ Register Assembly="ASPNetMediaGUI.NET3" Namespace="ASPNetMediaGUI" TagPrefix="ASPNetMediaGUI" %>
<%@ Register Assembly="ASPNetFlashVideo.NET3" Namespace="ASPNetFlashVideo" TagPrefix="ASPNetFlashVideo" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.myalwasvsibleclass
{
position:fixed;
z-index:10000;
right:0px;
bottom:0px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<div align="right">
Please enter text here<br />
<cc1:Editor ID="Editor1" runat="server" />
<asp:Button ID="Button3" runat="server" Text="Continue" Width="120" />
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
<ContentTemplate>
<ASPNetFlashVideo:FlashVideo cssclass="myalwasvsibleclass" ID="FlashVideo1" runat="server" AutoPlay="true" VideoURL="Images/whatisabusinessplan.flv" Height="360" ScaleMode="StretchToFit" ShowControlPanel="False" Width="640" WindowMode="Transparent" AllowFullScreen="False" BorderWidth="4" BorderColor="Maroon" Enabled="true" Alignment="Left"></ASPNetFlashVideo:FlashVideo>
<asp:AlwaysVisibleControlExtender ID="FlashVideo1_AlwaysVisibleControlExtender"
runat="server" Enabled="True" TargetControlID="FlashVideo1"
HorizontalSide="Left" VerticalSide="Bottom" >
</asp:AlwaysVisibleControlExtender>
<asp:Button ID="playb" runat="server" CssClass="myalwasvsibleclass" PostBackUrl="javascript:void()" Text="Play Video" />
<asp:Button ID="stopb" runat="server" CssClass="myalwasvsibleclass" PostBackUrl="javascript:void()" Text="Stop Video" />
<script type="text/javascript">
ASPNetMedia.FlashVideo("FlashVideo1").OnStop = function(object, position) {
document.getElementById('<%= FlashVideo1.ClientID %>').style.visibility = 'hidden';
document.getElementById('<%= stopb.ClientID %>').style.visibility = 'hidden';
document.getElementById('<%= playb.ClientID %>').style.visibility = 'visible';
}
ASPNetMedia.FlashVideo("FlashVideo1").OnFinish = function(object, position) {
document.getElementById('<%= FlashVideo1.ClientID %>').style.visibility = 'hidden';
document.getElementById('<%= stopb.ClientID %>').style.visibility = 'hidden';
document.getElementById('<%= playb.ClientID %>').style.visibility = 'visible';
}
ASPNetMedia.FlashVideo("FlashVideo1").OnPlay = function(object, position) {
document.getElementById('<%= FlashVideo1.ClientID %>').style.visibility = 'visible';
document.getElementById('<%= playb.ClientID %>').style.visibility = 'hidden';
document.getElementById('<%= stopb.ClientID %>').style.visibility = 'visible';
}
function playVideo() {
ASPNetMedia.FlashVideo("FlashVideo1").PlayMedia("Images/congratulations.flv");
}
function stopVideo() {
ASPNetMedia.FlashVideo("FlashVideo1").StopMedia;
}
</script>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
And here is the code of the default2.aspx.vb
Partial Class Default2
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.playb.Attributes.Add("onClick", "ASPNetMedia.FlashVideo('FlashVideo1').PlayMedia ()")
Me.stopb.Attributes.Add("onClick", "ASPNetMedia.FlashVideo('FlashVideo1').StopMedia ()")
End Sub
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
Response.Redirect("http://www.google.ca")
End Sub
End Class