These forums are provided for community interactions only. For official support please submit a support ticket.

You are not logged in.

#1 2011-06-19 07:21:51

midnite
New Member
Registered: 2006-03-17
Posts: 12

please - html links to control ssp

Hello, I've gone through every post here and the wiki and can't seem to get this to work.

i'm embedding the swf like this:

Code:

<script type="text/javascript" src="scripts/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.file = "";
var params = {};
params.menu = "false";
params.wmode = "transparent";
swfobject.embedSWF("swf/trailers.swf", "trailers", "620", "390", "9.0.0", "swf/expressInstall.swf", flashvars, params);
</script>

<script type="text/javascript">
function sspToggleDisplayMode() {
thisMovie("ssp").sspToggleDisplayMode();
}
function sspLoadContent(contentId) {
thisMovie("ssp").sspLoadContent(contentId);
}
</script>

and on the html page i have this:

Code:

<div id="trailers"></div>

<ul>
     <li><a href="#" onclick="sspLoadContent('moviea');">Movie A</a></li>
     <li><a href="#" onclick="sspLoadContent('movieb');">Movie B</a></li>
     <li><a href="#" onclick="sspLoadContent('moviec');">Movie C</a></li>
<ul>

and on the flash actionscript 2.0 i have:

Code:

import flash.external.*;
ExternalInterface.addCallback("sspToggleDisplayMode", null, sspToggleDisplayMode);
ExternalInterface.addCallback("sspLoadContent", null, sspLoadContent);
function sspToggleDisplayMode() {
my_ssp.toggleDisplayMode();
}
function sspLoadContent(contentId) {
my_ssp.LoadContent(contentId);
}

and this for my xml:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<album id="trailers" title="trailers" lgPath="" description="trailers slideshow.">
<img id="moviea" src="../flv/june2011/moviea.flv" caption="&lt;i&gt; Movie A &lt;/i&gt;" vidpreview="images/slideshow/june2011/moviea.jpg" />
<img id="movieb" src="../flv/june2011/movieb.flv" caption="&lt;i&gt; Movie B &lt;/i&gt;" vidpreview="images/slideshow/june2011/movieb.jpg" />
<img id="moviec" src="../flv/june2011/moviec.flv" caption="&lt;i&gt; Movie C &lt;/i&gt;" vidpreview="images/slideshow/june2011/moviec.jpg" />
</album>
</gallery>

i just can't get it to stop looping through the xml (which loads and works fine) and to stop and show the content i ask for when i click the html links. i imagine this has to do with the thisMovie("ssp") part of the function which i don't know what to do with the way the swf is being loaded now. i can't change how it's being loaded though. please help! thanks guys.

Offline

 

#2 2011-06-20 01:50:54

midnite
New Member
Registered: 2006-03-17
Posts: 12

Re: please - html links to control ssp

well i changed my flash embedding to this:

Code:

<script type="text/javascript" src="scripts/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.file = "";
var attributes = {
    id: "ssp"
}
var params = {};
params.menu = "false";
params.wmode = "transparent";
swfobject.embedSWF("swf/trailers.swf", "trailers", "620", "390", "9.0.0", "swf/expressInstall.swf", flashvars, params, attributes);
</script>

<script type="text/javascript">
function sspToggleDisplayMode() {
thisMovie("ssp").sspToggleDisplayMode();
}
function sspLoadContent(contentId) {
thisMovie("ssp").sspLoadContent(contentId);
}
</script>

and still no dice. might also be worth noting i'm using SWFObject v2.1

please, any help? i think there's been enough threads about this to warrant a demo with html links to particular images on one album that stops the player from looping when the html links are clicked. there's too many steps in the wiki not mentioned in that album toggle example. for example, i couldn't find any mention of sspLoadContent, whether or not i put anything in the (), or if anything in the () is supposed to have quotation marks, etc. please help a struggling designer out. thanks!

Offline

 

#3 2011-06-21 09:33:05

midnite
New Member
Registered: 2006-03-17
Posts: 12

Re: please - html links to control ssp

if anyone can help i'd really appreciate it, thanks!

Offline

 

#4 2011-06-21 22:37:42

midnite
New Member
Registered: 2006-03-17
Posts: 12

Re: please - html links to control ssp

still trying and not making any progress. any ideas? thanks.

Offline

 

#5 2011-06-22 10:33:45

midnite
New Member
Registered: 2006-03-17
Posts: 12

Re: please - html links to control ssp

ok, i figured it out.

on the AS 2.0 code add this:

Code:

import flash.external.*;
ExternalInterface.addCallback("loadContent", null, loadContent);

on the html add this to the head:

Code:

<script type="text/javascript">
function sspToggleDisplayMode() {
thisMovie("ssp").sspToggleDisplayMode();
}

function sspLoadAlbum(album) {
thisMovie("ssp").sspLoadAlbum(album);
}

function loadContent(contentID) {
thisMovie("ssp").loadContent(contentID);
}

function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName]
} else {
return document[movieName]
}
}
</script>

and on the html body add this:

Code:

<script type="text/javascript">
var flashvars = {};
flashvars.width = "550";
flashvars.height = "400";
flashvars.allowSciptAccess = "always";
var params = {};
params.allowfullscreen = "true";
var attributes = {};
attributes.id = "ssp";
swfobject.embedSWF("flash.swf", "ssp", "550", "400", "9.0.0", "/swfobject/expressInstall.swf", flashvars, params, attributes);
</script>

<div id="ssp"></div>

<ul>
<li><a href="#" onclick="loadContent('photo1');">load photo 1</a></li>
<li><a href="#" onclick="loadContent('photo2');">load photo 2</a></li>
<li><a href="#" onclick="loadContent('photo3');">load photo 3</a></li>
</ul>

and on your xml add the id's like this:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<album id="photos" title="Photos" lgPath="gallery/photos/lg/" tnPath="gallery/photos/tn/" description="photos.">
<img id="photo1" src="photo1.jpg" caption="photo 1" />
<img id="photo2" src="photo2.jpg" caption="photo 2" />
<img id="photo3" src="photo3.jpg" caption="photo 3" />
</album>
</gallery>

many many thanks to the SSP support team for acknowledging my post and adding a "hey buddy, we're really busy with our projects so you're on your own." hope this at least helps someone else who might need it since i didn't see these steps in the wiki or the demos.

great product but i would have appreciated an acknowledgement of my post from the support team to let me know whether or not help was coming. i would have understood, i know people get busy. cheers.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson