Topic: swfobject.js

hei guys,

tiltviewer is really cool and i got everything running with my flickr.
my question is: do i need to put swfobject.js in every gallery i made? i put one tiltviewer.swf in a folder and have a relative path from every gallery to it and it works fine, but when i try it with swfobject.js (with a relative or an absolute path) i get the message: "TiltViewer requires JavaScript and the latest Flash player. Get Flash here."
my problem is less the size (33 galleries * 7kb swfobjects.js = 264kb) it is more that when u update tiltviewer i will have to exchange every single file in 33 folders and there will be more in the future.
so is there a way or do i have to go with the method of putting the file in every gallery? i will live with it since i use free software.
also, will there be a possibility in the future to use picasa web. flickr is cool but it is limited to 200 pictures per free account. gets a little bit complex to have multiple accounts for multiple galleries.

keep up the good work. tiltviewer is really good.
best regards
brain-chan

Re: swfobject.js

you can share the js file between galleries. Check your paths.

Felix Turner
SimpleViewer Support Team.

Re: swfobject.js

hei felix

i put tiltviewer in a relative path like this
../../../../res/Tiltviewer.swf
if i try the same with the swfobject.js then i get the error message

Re: swfobject.js

hei felix

i put tiltviewer in a relative path like this
../../../../res/Tiltviewer.swf
if i try the same with the swfobject.js then i get the error message


Hi Brainchan and hi Felix,

it seems you are both very familiar with tiltviewer. Can you tell me where in the index.html you exactly write the relative path for tiltviewer in?

I ask because I work with webnode cms. Although I have tiltviewer and index.html and swfobject in the same directory I get the known message (you need flash...). Maybe a relative path will solve my problem.

Thanks for your help.

Btw: Tiltviewer is really a great tool! Thanks for it!

Re: swfobject.js

Hi Felix, hi brainchan,

could anybody be so kind and give me a (brief) answer?

I would be happy, if I could run tiltviewer. I just have no idea, where exactly I have to put the path where Tiltviewer.swf is located. Maybe you could send me the hole index.html-code (if I have to set the path in the index.html)?

Thanks for your help.

Re: swfobject.js

The way I do it Is I have a folder in my root directory called scripts and the JS goes in there. I can then call it in any page using the following in my HTML head tag.

This is a relative path:

<script type='text/javascript' src='/scripts/js/swfobject.js'></script>

If we look at the path the first forward slash tells the browser to begin in the root directory and look for a folder scripts and a sub folder js. If you are loading the script from a file within your root directory your may need to drop the first slash (scripts/js/swfobject.js).

This is an absolute path:

<script type='text/javascript' src='http&#58;//www.yoursite.com/scripts/js/swfobject.js'></script>

This is the basic html Doc I use, just update the swfobject path to fit your needs based on what I posted above.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http&#58;//www.w3.org/1999/xhtml" xml&#58;lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Your TiltViewer Gallery</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
         var params = &#123;&#125;;
         params.play = "true";
         params.menu = "false";
         params.quality = "best";
         params.scale = "noscale";
         //params.wmode = "transparent";
         params.allowfullscreen = "false";
         params.allowScriptAccess = "sameDomain";
         params.swLiveConnect = "true";
         var attributes = &#123;&#125;;
         attributes.id = "galleryContent";
         swfobject.embedSWF&#40;"TiltViewer.swf", "galleryContent", "100%", "100%", "8.0.0", false, params, attributes&#41;;
</script>
<style type="text/css" media="screen">
    object &#123; outline&#58;none; &#125;
</style>
</head>
<body>
<div id="galleryContent">
   <p>In order to view these galleries you must have <a href="http&#58;//www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Adobe Flash Player</a> installed.
   If you know that you have Flash installed, then please ensure JavaScript and/or Active Content are enabled.</p>
</div>
</body>
</html>
Mike Richards
SimpleViewer Support Team.

Re: swfobject.js

Dear Miker,

thanks a lot for your answer! big_smile I'll try it today.

Greatings from Austria.
Stefan