hi all,
i am hoping that someone might be able to put me right on this question/problem that i have using a combination of html/javascript/flash.
i am using lightwindow to display images/vids in an overlay over the top of html/flash content.
the lightwindow app can categorise the files by using ‘rel’ to link them into groups and subcategories. now if i use this in the html page:
<a href="gallery/fische01.mov" class="lightwindow page-options" rel="Evolution?[Man]" title="The Evolution of Man is looking grim..." caption="Man starts out kinda hairy..." author="Unknown" params="lightwindow_show_images=2"><strong>Image Gallery w/Multiple Images</strong> - Side by Sides can be good for Before and After Gallery's or to show actions, etc.!</a>
<a href="gallery/fische01.mov" class="lightwindow hidden" rel="Evolution?[Man]">image #1</a>
<a href="gallery/2-evolution.jpg" class="lightwindow hidden" rel="Evolution?[Man]" title="The Evolution of Man is looking grimmer..." caption="Later, Man seems to have learned how to sharpen stuff!" params="lightwindow_show_images=2">image #2</a>
<a href="gallery/3-evolution.jpg" class="lightwindow hidden" rel="Evolution?[Man]">image #3</a>
<a href="gallery/4-evolution.jpg" class="lightwindow hidden" rel="Evolution?[Man]" title="We are screwed!" caption="Finally, Man discovers how to comb his hair and order from McDonalds™... only one thing bigger than a Big Mac™." params="lightwindow_show_images=2">image #4</a>
<a href="gallery/5-evolution.jpg" class="lightwindow hidden" rel="Evolution?[Man]">image #5</a>
it works great and creates the gallery ‘evolution’ and a subsection of ‘man’ - and it works great and all the associated images can be navigated to using next and previous buttons.
i need this functionality to work from the flash file - the xml items that flash reads look like this
<thumbnail filename="thumb_01.jpg" url="gallery/fische01.mov" rel="Evolution?[Man]" target="_blank"
title="Item No. or title"
description="description of this thumbnail image and associated file" />
i added a trace to the items to see if the flash file is picking up the rel reference in the xml - and it does see it and read - but it doesn’t seem to be passing it on to the javascript that runs lightwindow.
from all of the advice i have had on this it seems to be a javascript problem and nothing to do with the way the flash is written - as it ‘does’ pick up the rel reference in the xml but doesn’t seem to be able to pass it on to lghtwindow.
my as3 for the thumbnails being clicked is this
var script:XML =
<script>
<![CDATA[
function(url, title_list, description_list, rel_list)
{
myLightWindow.activateWindow({href: url,
title: title_list,
caption: description_list,
rel: rel_list,
author: 'anon',
height: 300,
width: 450});
}
]]>
</script>;
function p_click(me:MouseEvent)
{
var sp:Sprite = me.target as Sprite;
var s_no:Number = parseInt(sp.name.slice(8,10));
trace("rel is '"+rel_list[s_no]+"'");ExternalInterface.call(script, url_list[s_no], title_list[s_no], description_list[s_no], rel_list[s_no]);
}
anyone know what is stopping the javascript from understanding the rel ref - and create the gallery/subset as it does from the html links???