latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

SWF file not loading, works outside s2member

Home Forums Community Forum SWF file not loading, works outside s2member

Tagged: , , ,

This topic contains 8 replies, has 2 voices. Last updated by  Sara 4 years, 5 months ago.

Topic Author Topic
Posted: Monday Aug 6th, 2012 at 3:16 pm #21265
Sara
Username: brightisland

I posted this to the community forum, but didn’t get any responses, so I’m just going ahead and diving in with Pro in hopes that someone will help me.

I have an *.swf file I’m trying to display via an index.html (located in a subfolder of s2member files). All of the restrictions seem to be in place just fine. I’ve successfully turned off the download confirmation (much easier this time around than last year! woohoo!).

Problem is, I cannot get the swf file to load. I get an error as if I don’t have Shockwave player installed.

The same folder and files work when I take them out of the s2member protected directory, but something seems to be preventing the *.swf file from loading as it should in the protected folder.

I had someone look at it from the flash file end and they said the following:

I’ve investigated the edition with firebug and it seems that there is problem in accessing JavaScript file named swfobject.js that is required to display properly the edition.

Instead of Java Script code, browser gets some html in the index.html file.

Two other Java script libraries (swfaddress.js, swfmacmousewheel.js) are always loaded properly. Perhaps it is a problem with access to this file? Some session-ID related problem?
You can try for example to set absolute, static paths to these libraries in index.html file.

So, I tried setting an absolute path for EVERYTHING in index.html, but still no success.

Any ideas?

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Tuesday Aug 7th, 2012 at 5:37 am #21336

Hi Sara.

So you have a folder with files inside the s2member-files directory? I imagine your file is trying to load others in the same folder. The thing is that all of the them will now be protected by s2Member, so you’ll need to modify the links to them in to include a download key. [hilite path]Dashboard -› s2Member® -› Download Options -› Advanced Download Restrictions[/hilite]

If you can’t do that, then you’ll need to use another player for your video file. We’ve found JW Player to work quite well so far. [hilite path]Dashboard -› s2Member® -› Download Options -› JW Player® & RTMP Protocol Examples[/hilite]

I hope that helps. :)

Posted: Friday Aug 10th, 2012 at 12:00 am #21672
Sara
Username: brightisland

Weird! I thought I had already submitted a reply to this, but it’s not here.

Yes, all of my files are in a folder, with a series of subfolders. The swf portion(s) of this were not generated by me, but generated by a PDF to Digital Publication program.

What I’m unclear on is how to use the download key, and I’m not sure the JWPlayer would work because I need to display the swf in the index.html file (because it’s a full-screen display).

For the download key, a few questions:

1) Do I need to include a download key to every file referenced within the index.html file, or only to the index.html file, itself?

2) Will the person who uses the key — since it’s time and date generated — be able to generate a fresh key the next day, or anytime they log in? I want people to be able to log in with their account at any time from any place to see the content, because it’s a magazine that they may want to access throughout football season?

3) How would I include the download key in this link (which is the link I’m currently using to the members-only access file):

http://bonesvillemedia.com/site/wp-content/plugins/s2member-files/2012-BVL-DIGITAL/index.html&s2member_skip_confirmation=yes

Posted: Friday Aug 10th, 2012 at 9:42 pm #21735

1) Do I need to include a download key to every file referenced within the index.html file, or only to the index.html file, itself?

Every file in the s2member-files folder, is protected by s2Member. If the person needs several files loaded, either the user has to be logged in with enough access to view the files, or the URL to each protected file has an access key.

2) Will the person who uses the key — since it’s time and date generated — be able to generate a fresh key the next day, or anytime they log in? I want people to be able to log in with their account at any time from any place to see the content, because it’s a magazine that they may want to access throughout football season?

Yes, a new key would get generated with each page load.

3) How would I include the download key in this link (which is the link I’m currently using to the members-only access file):

You can read the documentation here: [hilite path]Dashboard -› s2Member® -› Download Options -› Advanced Download Restrictions[/hilite]

In your example, I think it’d be:

[hilite pre_code]
http://bonesvillemedia.com/site/wp-content/plugins/s2member-files/2012-BVL-DIGITAL/index.html?s2member_skip_confirmation=yes&s2member_file_download_key=
[/hilite]
Posted: Friday Aug 10th, 2012 at 10:26 pm #21739
Sara
Username: brightisland

I’m getting this error:

503 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance.

And the link generated looks like this:

http://bonesvillemedia.com/site/?s2member_file_download=2012-BVL-DIGITAL/index.html&s2member_file_download_key=43dfa0b5c29add18aabf715685119378 target=

I have tried the link as you suggested, and like this:

<a href="http://bonesvillemedia.com/site/?s2member_file_download=2012-BVL-DIGITAL/index.html&s2member_file_download_key=[s2Key file_download="2012-BVL-DIGITAL/index.html" download_key="true" /] target="_blank">

And one more thing, I have tried JWPlayer in a desperate attempt to get this to work, but it seems geared towards videos, whereas with this, the *swf files are really just click-through pages.

  • This reply was modified 4 years, 5 months ago by  Sara.
  • This reply was modified 4 years, 5 months ago by  Sara.
Posted: Friday Aug 10th, 2012 at 10:46 pm #21741
Sara
Username: brightisland

Anyone – please help!

If I cannot get this to work between tonight and tomorrow, I will have missed the window for which the digital edition of this publication will be desirable, as the print edition will already be arriving in mailboxes first of next week.

Thanks in advance!

Posted: Friday Aug 10th, 2012 at 11:10 pm #21744
Sara
Username: brightisland

One last thing, in case it’s helpful, here is the code for the index.html page:

<!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" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>2012 Bonesville The Magazine</title>
<script type="text/javascript" src="ebook/js/swfobject.js"></script>
<script type="text/javascript" src="ebook/js/swfaddress.js"></script>
<script type="text/javascript" src="ebook/js/swfmacmousewheel.js"></script>
<style>
	html, body { height: 100%; margin: 0px;}
</style>
</head>
<body bgcolor="#333333">
	<div id="ebookcontainer">
		<!-- Your ebook will be displayed here. In case user hasn't got actual version of Adobe Flash Player, the below description
		will appear.
		-->
		Hello, you either have JavaScript turned off or an old version of Adobe’s Flash Player.
		<a href="http://www.macromedia.com/go/getflash/">Get Flash.</a> 
	</div>    
	<script language="JavaScript" type="text/javascript">			
	   
		var flashvars = {};
		/* Adjust setting below to your personal needs (Don't forget to remove '//' from the beginning of the line)  */
			
		flashvars.locales = "en_EN";
		flashvars.logoURL = "www.bonesville.net";                //URL logo link		
		
		
		/* eBook dimension in percentages or in pixels  (var w = "100%", var w = "800" ) */
		var w = "100%";	//width
		var h = "100%";	//height
		
		var params = {};
		params.allowfullscreen = "true";
		params.allowscriptaccess = "always";
		params.allownetworking = "all";
		//params.wmode = "transparent"; //uncomment for transparent eBook background
		swfobject.embedSWF( "ebook/ebook.swf", "ebookcontainer", w, h, "10.0.0", "ebook/js/expressInstall.swf", flashvars, params );
	</script>
</body>
</html>
Posted: Saturday Aug 11th, 2012 at 6:55 am #21759

If I cannot get this to work between tonight and tomorrow, I will have missed the window for which the digital edition of this publication will be desirable, as the print edition will already be arriving in mailboxes first of next week.

I think that, until you figure out how to protect these files that you generate for the digital edition, you should put the thing outside the s2member-files directory and link to it from a protected WP page only. That way you serve your readers without delays, while you work out the download protection part.

I have tried the link as you suggested, and like this:

Could you try this one?

[hilite pre_code]
http://bonesvillemedia.com/site/?s2member_skip_confirmation=yes&s2member_file_download_key=&s2member_file_download=2012-BVL-DIGITAL/index.html
[/hilite]

And one more thing, I have tried JWPlayer in a desperate attempt to get this to work, but it seems geared towards videos, whereas with this, the *swf files are really just click-through pages.

Yeah, JW Player is for audio and video files, it’s not going to work for a digital magazine.

Posted: Saturday Aug 11th, 2012 at 11:05 am #21779
Sara
Username: brightisland

Thanks for trying to help. I hope we can get this figured out, but it’s still not working yet…

I tried the link you suggested.

Still getting that invalid key error.

Would it help if you had access to my WP installation and my FTP so you could see the structure?

In the meantime, the folder structure for the digital magazine is as follows:

s2member-files/2012/
s2member-files/2012/ebook/
s2member-files/2012/ebook/config/
s2member-files/2012/ebook/config/lang/
s2member-files/2012/ebook/config/lang/global.xml
s2member-files/2012/ebook/config/lang/links.xml
s2member-files/2012/ebook/config/lang/publication.xml
s2member-files/2012/ebook/content/
s2member-files/2012/ebook/content/dxp/
s2member-files/2012/ebook/content/dxp/[100 different .swf files populate this folder]
s2member-files/2012/ebook/content/gdx/
s2member-files/2012/ebook/content/gdx/[100 different .swf files populate this folder]
s2member-files/2012/ebook/content/skin/
s2member-files/2012/ebook/content/skin/skin_6.swf
s2member-files/2012/ebook/content/snd/
s2member-files/2012/ebook/content/snd/drag.mp3
s2member-files/2012/ebook/content/snd/restore.mp3
s2member-files/2012/ebook/content/snd/turn.mp3
s2member-files/2012/ebook/content/logo.png
s2member-files/2012/ebook/js/
s2member-files/2012/ebook/js/swfaddress.js
s2member-files/2012/ebook/js/swfmacmousewheel.js
s2member-files/2012/ebook/js/swfobject.js
s2member-files/2012/ebook/js/expressinstall.swf
s2member-files/2012/ebook/ebook.swf
s2member-files/2012/ebook/viewer.swf
s2member-files/2012/2012BVL.html
s2member-files/2012/ebook.ico

BTW, I changed the name of the directory [from /2012-BVL-DIGITAL/ to /2012/] and index file [from index.html to 2012BVL.html] last night, as I was trying to duplicate the same thing we used on our other server last year, which still works just fine and it’s the exact same file structure and everything. Only the content files have changed.

Viewing 8 replies - 1 through 8 (of 8 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.