Solved

linking lightbox to button in flash AS2

Posted on 2010-11-21
5
1,093 Views
Last Modified: 2013-11-19
Hello,

I'm having a problem trying to get lightbox to work on a flash site.
When you press the button, it shows nothing

iv been following this guide :
http://blog.codefidelity.com/?p=16

I tried using a normal link in the index.html without flash, this works, so the problem should be in the java flash function or the AS2 code on the flash button.

Everything is as it should be, i think....

you can try it at http://www.detail-collection.be/site2/

complete index.html and AS2 button code included in attachments

thnx!
Flash AS2

on (release) {
	getURL("javascript:LightboxDelegate('nieuwsbrief/winter1011a.jpg','Winter nieuwsbrief 2010-11')");
}

Open in new window

INDEX HTML


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
<head>

<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
	
<script type="text/javascript">
   function LightboxDelegate(url,caption) {
   var objLink = document.createElement('a');
   objLink.setAttribute('href',url);
   objLink.setAttribute('rel','lightbox');
   objLink.setAttribute('title',caption);
   Lightbox.prototype.start(objLink);
}
</script>

		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <meta name="description" content="Détail - Juwelen"/>
	<meta name="keywords" content="juwelen,design,handgemaakt,zilver,ringen,armbanden,halskettingen,half-edelstenen"/>
<meta http-equiv="CONTENT-LANGAGE" content="nl" />
		<link rel="icon" href="favicon.ico">
		<title>Détail Juwelen</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<style type="text/css" title="text/css">
<!--
.centered {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 50%;
height: 50%;
margin: auto;
}
-->
</style>


</head>
<body>
<a href="nieuwsbrief/winter1011a.jpg" rel="lightbox">image #1</a>

<!--URL's die in de film worden gebruikt-->
<!--tekst die in de film wordt gebruikt-->
<!-- saved from url=(0013)about:internet -->
<table height=100% width=100%>
<tr><td valign="middle">
  <center>
  
<script language="javascript">
	if (AC_FL_RunContent == 0) {
		alert("Deze pagina vereist AC_RunActiveContent.js.");
	} else {
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
			'width', '800',
			'height', '600',
			'src', 'detail',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'transparent',
			'devicefont', 'false',
			'id', 'detail',
			'bgcolor', '#ffffff',
			'name', 'detail',
			'menu', 'true',
			'allowFullScreen', 'false',
			'allowScriptAccess','sameDomain',
			'movie', 'detail',
			'salign', ''
			); //end AC code
	}
</script>
      
<noscript>

	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="800" height="600" id="detail" align="middle">
	  <param name="allowScriptAccess" value="samedomain" />
      <param name="wmode" value="transparent" />
   	<param name="allowFullScreen" value="false" />
	<param name="movie" value="detail.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="detail.swf" quality="high" bgcolor="#ffffff" width="800" height="600" name="detail" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"/>
	</object>
</noscript>
</center>
</td></tr>
</table>
 
 
</body>
</html>

Open in new window

0
Comment
Question by:Th0R
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 6

Expert Comment

by:Codebot
ID: 34238745
0
 

Accepted Solution

by:
Th0R earned 0 total points
ID: 34244215
Ok,
after to many houres i found something that worked for me.
http://www.aleosoft.com/flashtutorial_lightbox2.html

following this worked from the first try.
0
 

Author Closing Comment

by:Th0R
ID: 34276837
solved it on my own :)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Rotate images for Web Page 11 25
Link Anchor Not working 9 46
Getting selected value using Jquery 3 20
HTML editor custom button 3 56
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question