Page 1 of 1

Dynamically Load protected FLV into protected SWF

PostPosted: July 22nd, 2011, 10:46 am
by cdils
I'm running into an odd problem and wanted to see if anyone else has experienced this.

I'm embedding a .swf file and using flashvars to dynamically load different .flv and .xml files. (As a quick background note, I am NOT using any video plugins such as JW, Kimili, or swfObj for Wordpress - I tried them all, but opted instead to go with good ole HTML and Javascript and am loading my page into Wordpress as a template page)

The .swf embed works flawlessly using:
Code: Select all
http://www.MyDomain.com/?s2member_file_download=MyMovieScreen.[b]swf[/b]&s2member_skip_confirmation&s2member_file_inline=yes


The .xml file I'm passing as a flashvar works flawlessly using:
Code: Select all
http://www.MyDomain.com/?s2member_file_download=MyMovie_transcript.[b]xml[/b]&s2member_skip_confirmation&s2member_file_inline=yes


My problem is with the .flv file. Feeding it as a flashvar using an identical call as the .xml file, it won't load.
Code: Select all
http://www.MyDomain.com/?s2member_file_download=MyMovie.[b]flv[/b]&s2member_skip_confirmation&s2member_file_inline=yes


Under my s2Member Download options, I've included "flv" as a file type to show inline. Can't think of any other reason why this won't work. If anyone has suggestions, I'd love to hear them. Thanks!

Re: Dynamically Load protected FLV into protected SWF

PostPosted: July 25th, 2011, 3:03 pm
by cdils
Any ideas out there? I am stumped!

Re: Dynamically Load protected FLV into protected SWF

PostPosted: July 26th, 2011, 4:43 am
by Cristián Lávaque
I don't know very much about this, but others here do. Have you read this thread? viewtopic.php?f=4&t=2937 Although they're talking about using plugins for this, the information there may help you do what you want.

I hope it helps. :)

Re: Dynamically Load protected FLV into protected SWF

PostPosted: July 27th, 2011, 7:08 am
by cdils
Thanks Cristian! I had read through that one too, but no luck. I ended up with a ghetto workaround. Gets the job done. :)

Re: Dynamically Load protected FLV into protected SWF

PostPosted: July 27th, 2011, 2:17 pm
by Cristián Lávaque
Cool, I'm glad you got it working! Could you share what you did? :)

Re: Dynamically Load protected FLV into protected SWF

PostPosted: July 27th, 2011, 3:32 pm
by cdils
Sure! It's probably not satisfactory for most, but I had to publish it and move on to other things...

I loaded my .swf file and the two .xmls files (that get pulled in as flashvars) under the s2member-files/ directory. The .flv file got dumped in a non-secure directory, since that's the one that I couldn't make work "under protection".

The Wordpress page that displays the embedded .swf is also protected by s2Member. If a logged-in user were to view sourcecode on the embedded swf, they could figure out how to get to the unprotected .flv. But I'm 1) banking that most customers aren't savvy enough to do that (or care to do that), and 2) even if they did, the .flv itself isn't a big government secret, so no crying.

Like I said, not an elegant solution, but I ran out of time to problem solve it and just needed it to work.

Re: Dynamically Load protected FLV into protected SWF

PostPosted: July 27th, 2011, 4:56 pm
by Cristián Lávaque
Good enough solution. Thanks for sharing it! :)