Oh my god,
thank you. All I needed to do was change one line of code to:
Flash1.FlashVars.Add("file ", "FLV_01.flv"); as you indicated, and
bam, it works. It did not occur to me to try that. And no, i did not
need the streaming part.
I will take a look at the 2.0 stuff also. I just found out about all
this flv player stuff in the past three days.
So for anybody that is interested the solution for an ajax based FLV
player with hidden elements:
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="upTabs" runat="server">
<ContentTemplate>
<table cellpadding="2" cellspacing="1"
border="0">
<tr valign="top">
<td colspan="2" align="left">
<asp:Button
ID="btnShowVid" runat="server" Text="Display Video"
OnClick="btnShowVid_Click" />
</td>
</tr>
<tr valign="top">
<td colspan="2" align="left">
<asp:PlaceHolder
ID="phVideoPlayer" runat="server"
Visible="false">
<Bewise:FlashControl ID="FlashControl1" runat="server"
BrowserDetection="False" Height="400px" Width="600px" />
</asp:PlaceHolder>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</form>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.phVideoPlayer.Visible = false;
}
}
protected void btnShowVid_Click(object sender, EventArgs e)
{
//Show the video
this.phVideoPlayer.Visible = true;
FlashControl1.Height = 600;
FlashControl1.Width = 600;
FlashControl1.MovieUrl =
"/FlashVideo/Flash_Media/player_01.swf";
System.Collections.Specialized.NameValueCollection flashVarsCol
=
new System.Collections.Specialized.NameValueCollection();
flashVarsCol.Add("allowscriptaccess", "always");
flashVarsCol.Add("allowfullscreen", "true");
flashVarsCol.Add("file", "/FlashVideo/Flash_Media/FLV_01.flv");
FlashControl1.FlashVarsCollection = flashVarsCol;
}
On Feb 9, 2:32 pm, "Aran Rhee" <[email protected]> wrote:
> Ok, so #1, the code you have supplied is old SWFObject 1.5 notation. That is
> ok, but just keep in mind that 1.x code is not supported or maintained
> anymore.
>
> With 1.x when you want to add variables (flashvars) to your Flash file, you
> can either add a single value at a time through the addVariable() method
> like:
>
> s1.addVariable ('streamer','lighttpd');
> s1.addVariable ('file', 'FLV_01.flv');
>
> OR you can add ALL flashvars through a single call in a params call which is
> ampersand delimited like:
>
> s1.addParam('flashvars', 'streamer=lighttpd&file=FLV_01.flv');
>
> Have a look at the SWFObject 1.x documentation
> here:http://blog.deconcept.com/swfobject/
>
> In regards to using the .NET control, it seems to add flashvars in single
> variable/name pair calls like the first example above. So you would want:
>
> protected void Page_Load(object sender, EventArgs e)
> {
> Flash1.FlashVars.Add("allowscriptaccess","always");
> Flash1.FlashVars.Add("allowfullscreen","true");
> Flash1.FlashVars.Add("streamer", "lighttpd");
> Flash1.FlashVars.Add("file ", "FLV_01.flv");
>
> }
>
> BTW, are you actually using lighttpd to do pseudo streaming of your FLV? If
> not, then remove the streamer variable call.
>
> Cheers,
> Aran
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On
>
> Behalf Of Jimsurf
> Sent: Tuesday, 10 February 2009 8:49 AM
> To: SWFObject
> Subject: Re: hating swfobject with Ajax
>
> I should probablye elaborate a little bit on my last post. First, the
> swf file (player_01.swf) I want to display is an FLV player. The
> flashvars element binds the flv file (flv_01.flv) to the player.
> This works fine when I hard code it with the inline javascript. But I
> can't seem to figure out how to do the binding of the flv file to the
> swf file with the control.
> I am going through the properties list, and I don't see one that works
> to replace the following line:
> s1.addParam('flashvars','file=FLV_01.flv');
>
> On Feb 9, 1:40 pm, Jimsurf <[email protected]> wrote:
> > OK, Thanks for the post. This appears to be similiar to the Flash
> > Control. The problem I am having is how to assign an flv movie to this
> > control. The generic HTML code for this is:
>
> > <div style="width:690; height:520">
> > <div id="MissionBeachVolleyballPlayer" style="font-weight: bold;
> font-
> > size: 14px; padding-bottom: 0px; padding-top: 0px">
> > <p id='MissionBeachVolleyball'>You need to install Flash
> 9!</p>
> > <script type='text/javascript'
> src='swfobject.js'></script>
> > <script type="text/javascript">
> > var s1 = new SWFObject
> > ('player_01.swf','player','690','520','9','FFCCFF');
> > s1.addParam('allowscriptaccess','always');
> > s1.addParam('allowfullscreen','true');
> > s1.addParam('streamer','lighttpd');
> > s1.addParam('flashvars','file=FLV_01.flv');
> > s1.write('MissionBeachVolleyball');
> > </script>
> > </div>
> > </div>
>
> > I can't figure out hot to set the flv movie to the .net object. This
> > does not work:
>
> > <arj:SWFObject ID="Flash1" Height="600" Width="600" runat="server"
> > FlashUrl="player_01.swf" AlternateContent="Calendar Goes Here" />
>
> > protected void Page_Load(object sender, EventArgs e)
> > {
> > Flash1.FlashVars.Add("allowscriptaccess","always");
> > Flash1.FlashVars.Add("allowfullscreen","true");
> > Flash1.FlashVars.Add("streamer", "lighttpd");
> > Flash1.FlashVars.Add("flashvars", "file=FLV_01.flv");
> > }
>
> > Any ideas???
>
> > On Feb 9, 12:30 pm, "Getify Solutions, Inc." <[email protected]> wrote:
>
> > > Have you tried: http://www.arjones.net/opensource/swfobject.net/
>
> > > --Kyle
>
> > > --------------------------------------------------
> > > From: "Jimsurf" <[email protected]>
> > > Sent: Monday, February 09, 2009 2:07 PM
> > > To: "SWFObject" <[email protected]>
> > > Subject: hating swfobject with Ajax
>
> > > > I have a site that uses ajax and a drop down to display videos. I have
> > > > not found a single code sample of a working example of using register
> > > > startup or client script that shows how to do this in the code behind
> > > > of an asp.net application that uses ajax. Has anybody been able to
> > > > accomplish this? Does the swfobject site contain asp.net code samples?
>
> > > > I got some info from somebody else on using the Flash Control for
> > > > ASP.Net, but I have not been able to figure out how to use it with swf
> > > > object.
>
> > > > I need a solution for displaying flv files on my site within an swf
> > > > player.
>
> > > > The only successful solution I have been able to come up with is an
> > > > iframe, but that is such a kluge of a solution.- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---