Log in

View Full Version : Lightbox from flash/xml files



kate heather
11-19-2008, 06:03 PM
Hi everyone,

I am a designer with very little knowledge of java script and action script...
I've been struggling to make lightbox work in my flash website for almost 2 months....
I've been following all the hints in various online forums but I just can't get the lightbox to work at all !!
All I get is the "undefined" word in my flash movie or a large image opens in a blank html window.....etc etc

I really appreciate if someone could gimme a hand...

My lightbox files are working properly since they all work in my other html built sites.

The problem is the website I'm designing for a client which is built in flash....

I don't need to call the lightbox for [group of images], only single images would be fine.

I have only one flash button that works for all thumbnails (dynamic), so I would need an action script linkage to make that flash button call the large jpeg images (according to each thumbnail) having the lightbox effect.

The thumbnails are spread in different portfolio sections (eg. graphic design, marketing, etc). and every portfolio page (flash) has a XML file to command the thumbnails of that specific page.

Structure of my XMLs:
<thumbnails>
<thumbnail filename="journeyAD.png" label="The Journey"
url="large/journeyAD.jpg"
description="This AD was published on the American magazine Arabian Horse World..." />

In the index HTML Head:
<link rel="stylesheet" href="lightbox/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="lightbox/prototype.js"></script>
<script type="text/javascript" src="lightbox/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="lightbox/lightbox.js"></script>

<link href="lightbox.css" rel="stylesheet" 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>


In my flash file, I have this action applied to the button:
on (release) {
PictureMC.onRelease = function() {
getURL("javascript:LightboxDelegate('journeyAD.jpg','The Journey')");
};
}


Well, I am really confused after so many changes I've made... and very frustrated because I can't get the lightbox working in that site.... I thought it would be as easy as it worked well for all my html sites....but nope !!

I'd love if someone could drop me a few lines with some hints.
Thanks a bunch.
Kate

kate heather
12-15-2008, 09:39 PM
Hi Medyman !!
Please gimme a hand here !!
I haven't got any replies or help from anyone yet....
Thanks !
Kate

Snookerman
12-15-2008, 10:00 PM
This thread might be helpful:
http://www.dynamicdrive.com/forums/showthread.php?p=174045#post174045 (http://www.dynamicdrive.com/forums/showthread.php?p=174045#post174045)

There are several other threads about this..

Medyman
12-16-2008, 12:05 AM
Hi Medyman !!
Please gimme a hand here !!
I haven't got any replies or help from anyone yet....
Thanks !
Kate

Hi Kate...

I hadn't seen this thread before. Sorry. Give a look at the thread that Snookerman links to. Perhaps, that page can be of assistance?

kate heather
12-16-2008, 02:48 AM
Thanks a lot guys ! I am leaving on a 40-day trip tonight and will try to work with that script when and I get back. I'll let you know if it worked or not, OK?
Thanks a bunch and talk to you soon !
Kate

Medyman
12-17-2008, 04:29 PM
lol, yeah sure. Post back if you still need help then.

Snookerman
12-17-2008, 05:06 PM
:D Sounds great, have a nice trip!