PDA

View Full Version : swf object 2 issue


jockturner
06-19-2010, 06:20 PM
Hi, recently purchase FPP to convert some Quicktime panos into Flash. All was going well using swfobject 1.5 but the CMS I use (Expression Engine) seems to have an issue with this version.

So I thought I could happily use swfobject 2.2 (which I know will work). However, I cannot now get the pano to display on my test page even before trying it in EE.

Could someone who is much more knowledgable than me have a look at the code below and tell me what I have to change to get this working.

test.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>bigtest</title>

<script type="text/javascript" src="http://www.nmmc.co.uk/ee/panos/includes/swfobject.js">

</script>
<style type="text/css">
#flashcontent {
width: 680px;
height: 450px;
}
</style>
</head>
<body>
<div id="flashcontent"> </div>
<script type="text/javascript">
var so = new SWFObject("pano.swf", "pano", "680", "450", "9", "#FFFFFF");
so.addVariable("panoName", "falmouthgallery");
so.addVariable("xml_file", "common.xml");
so.addParam("allowFullScreen","true");
so.addParam("scale", "noscale");
so.write("flashcontent");
</script>

</body>
</html>


The .swf, common.xml and movie file (falmouthgallery.mov) are all in the same folder and all the other files that are referenced within the xml code are in a directory called includes (as you will see below)

common.xml:

<?xml version = '1.0' encoding = 'utf-8'?>
<panorama>
<parameters>
panoType = mov
loaderText =
layer_1 = includes/movDecoder.swf
layer_2 = includes/hotspots.swf
layer_3 = includes/glassMeter.swf
layer_4 = includes/autorotator.swf
layer_5 = includes/menuFullscreen.swf
</parameters>

<autorotator>
speed = -0.3
interval = 30
pause = 5000
quality = low
</autorotator>

<hotspots>
<global onOver="scale=1.1,600,elastic;depth+=20" onOut="scale=1,300;depth-=20">

<spot id="info" static="1" salign="BC" staticX="-315" staticY="-25" url="images/info-icon.gif" onClick="infoscreen.visible+=1"/>
<spot id="infoscreen" url="images/logoInfo.png" static="1" visible="0" onClick="visible=0" onOver="" onOut=""/>
<spot id="zoomIn" static="1" salign="BC" staticX="-290" staticY="-25" url="images/zoom_in.png" blockMouse="1" onPress="pano.zoomKey=2,500" onRelease="pano.zoomKey=0"/>
<spot id="zoomOut" static="1" salign="BC" staticX="-265" staticY="-25" url="images/zoom_out.png" blockMouse="1" onPress="pano.zoomKey=-2,500" onRelease="pano.zoomKey=0"/>

<spot alt="Full screen mode" id="full" static="1" salign="BC" staticX="290" staticY="-40" url="images/fullscreen.png" onClick="fullscreen(-)"/>

</global>
</hotspots>

</panorama>


I'm happy to try a different method of diplaying the panoramas if necessary but would like to get this method working if at all possible.

Any help would be really great.

Trausti Hraunfjord
06-19-2010, 06:59 PM
Please find attached to this post a project that uses swfObject.js version 2

Read the "READ ME.txt" files found in the folders.

Hopefully this will help.

You should be able to replace the images in the project with your own, making the proper renaming etc for yours to work... and then build more on the project.

This is a stripped output from Flashificator.

Best of luck.

Trausti

jockturner
06-19-2010, 07:50 PM
Thanks for the quick reply, I'll give it a go and let you now how I get on.

Regards, Jock

jockturner
06-19-2010, 10:03 PM
Hi, that seems to work but I need to customise the xml file to reference a single quicktime movie file (as opposed to 6 cubes)?

Also, I'd like to have a single common xml file that I can use for a number of panoramas. How do I reference the pano name within the script that calls the xml file (keeping the xml non specific). I'm guessing it's a parameter within flashvars but I'm not an expert in this department.

Trausti Hraunfjord
06-19-2010, 11:23 PM
Here you have a basic template, that should be useful. It has 10 linked thumbs with 10 dummy mov files... a dashboard and other basic elements for getting things up and running. Pay attention to the "READ ME" files, and you will have to rename your mov's and all that extra hand coding thingy that I am blissfully ignorant of.

Using the template I have here, it takes only seconds to populate the project with 10 panos, and only 3-5 minutes to change the default design to something unique, including internet radio stations, video insertion, flyout images etc.

.... when using Flashificator.

Hope this helps, and best of luck.