Ragazzi sono riuscito finalmente a farlo funzionare , il problema infatti era nella funzione js che chiamava la foto cioè questa:
codice:
function show(url) {
var a = document.getElementById('ancoraggio1');
a.setAttribute('href',url);
myLightbox.start(a);
}
Ho trovato una soluzione funzionale ma stilisticamente orrenda
Ho infatti duplicato tante funzioni quante sono le foto (assurdo vero? ) è le ho richiamate ad una ad una dai rispettivi pulsanti in flash.
Vi allego il codice
HTML
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen">
<script type="text/javascript" src="js/prototype.lite.js"></script>
<script type="text/javascript" src="js/moo.fx.js"></script>
<script type="text/javascript" src="js/litebox-1.0.js"></script>
<script type="text/javascript">
function show1(url) {
var a = document.getElementById('ancoraggio1');
a.setAttribute('href',url);
myLightbox.start(a);
}
function show2(url) {
var a = document.getElementById('ancoraggio2');
a.setAttribute('href',url);
myLightbox.start(a);
}
function show3(url) {
var a = document.getElementById('ancoraggio3');
a.setAttribute('href',url);
myLightbox.start(a);
}
function show4(url) {
var a = document.getElementById('ancoraggio4');
a.setAttribute('href',url);
myLightbox.start(a);
}
</script>
<title>Swf vs Litebox</title>
</head>
<body onload="initLightbox()">
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<object type="application/x-shockwave-flash" data="thumb2.swf" wmode="transparent" width="850" height="150">
<param name="movie" value="thumb2.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
</object>
</div></td>
</tr>
</table>
</body>
</html>
Flash:
codice:
on (press) {
// Pulsante 1
getURL("java-script:show1('images/mare(1).jpg')");
}
on (press) {
// Pulsante 2
getURL("java-script:show2('images/mare(1).jpg')");
}
on (press) {
// Pulsante 3
getURL("java-script:show3('images/mare(1).jpg')");
}
on (press) {
// Pulsante 4
getURL("java-script:show4('images/mare(1).jpg')");
}
Dovrei quindi realizzare un unica funzione che si comporti come le quattro.
Non penso sia qualcosa di impossibile, ma io non ci capisco molto di js.
Qualcuno può aiutarmi?
Questo è il link dove potete vedere l'esempio funzionante: link
Grazie!