/    Sign up×
Community /Pin to ProfileBookmark

Egyptian Tomb + lightbox + browser back button = AAARRGGGHH

Hello Everbody,

I have been at this problem for 10 hours now and am going NUTS!! I am making website to look around an ancient Egyptian Tomb. Feel free to have a look: [URL=”http://www.campbelltest.co.uk/britishMuseum/online/”]http://www.campbelltest.co.uk/britishMuseum/online/[/URL]

I have a flash movie which I have scripted to utilise the browser back button using this script [URL=”http://www.asual.com/swfaddress/docs/”]http://www.asual.com/swfaddress/docs/[/URL]. This works fine until open a lightbox image form within the flash movie using Lokesh Dhakar Light box [URL=”http://www.lokeshdhakar.com/projects/lightbox2/”]http://www.lokeshdhakar.com/projects/lightbox2/[/URL] and the browsers back button stops working!!

The code below is to the JavScript links and the code that lauches the lightbox:

[CODE]<script type=”text/javascript” src=”js/swfaddress-optimizer.js”></script>
<script type=”text/javascript” src=”js/swfobject.js”></script>
<script type=”text/javascript” src=”js/swfaddress.js”></script>
<script type=”text/javascript” src=”js/swfmacmousewheel.js”></script>
<script src=”js/prototype.js” type=”text/javascript”></script>
<script src=”js/scriptaculous.js?load=effects” type=”text/javascript”></script>
<script src=”js/lightbox.js” type=”text/javascript”></script>
<!– start | JC –>
<!– added for flash –>
<!– added for launch from flash –>
<script language=”JavaScript”>
function openLightbox(url,group){
var objLink = document.createElement(‘a’);
objLink.setAttribute(‘href’,url);
objLink.setAttribute(‘rel’,’lightbox[‘+group+’]’);
objLink.setAttribute(‘title’,’caption’);
Lightbox.prototype.start(objLink);
}
</script>
<!– end | JC –>[/CODE]

This code is how I have embeded the flash in the page:

[CODE]<script type=”text/javascript”>
var so = new SWFObject(‘container04.swf’, ‘container04’, ‘760’, ‘450’, ‘8’, ‘#ffffff’);
so.useExpressInstall(‘js/expressinstall.swf’);
so.addParam(‘menu’, ‘false’);
//so.addParam(‘movie’,’container04′);
so.write(‘flashcontent’);
var macmousewheel = new SWFMacMouseWheel( so );
</script>[/CODE]

I have added a text box to movie that shows the back button function exicuting and what its exicuting. I have never done any work with JavaScript before so I am up the creek without a paddle!!

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @chin_masterj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...