shadowbox from flash, navigation missing

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

shadowbox from flash, navigation missing

leerraum
hi,

I'm using a Flash coverflow script to call the shadowbox. (btw. I like it really)

When the images are displayed theres no navigation to step to the next image or the previous. It may be a problem that I'm not using regular links. Instead theres a wrapper function. The whole thing looks like this:

Flash:
getURL("javascript:openShadowbox('"+infostruc[current-1].albumLink+"','img','');");

JS:
<script type="text/javascript"> Shadowbox.init( { displayNav: true // nope, doesn't work out } ); function openShadowbox(content, player, title){ Shadowbox.open({ content: content, player: player, title: title, gallery: "some" }); } </script>
Is the navigation problem connected to the absence of a gallery? How can I do that?

Cheers..
leerraum

oh, ehm, shadowbox 3.0.2

and a sample:
http://kai-reinhardt.de/client/gruner/
Reply | Threaded
Open this post in threaded view
|

Re: shadowbox from flash, navigation missing

leerraum
*bump*

nobody? can't believe thats the first time something like this happens...

Reply | Threaded
Open this post in threaded view
|

Re: shadowbox from flash, navigation missing

DgAPc
In reply to this post by leerraum
first you type this in flash

on (press) {
getURL("javascript:openShadowbox(1)");
}

then replace the function with this javascript
Note:  for name_of_id replace it to what you want to give the gallery an id.

function openShadowbox(image) {
var a = document.getElementById("name_of_id"+image+"");
var f = new Array()
f[1] = "file1.jpg";
f[2] = "file2.jpg";
var url = f[image];
a.className = 'url';
Shadowbox.open(a);
};

and to add more imgs to the gallery just add
f[3] = "file3.jpg";

and you can keep adding imgs and any type of player type as much as you like.  you can use the number from flash to call that image from the array.  So putting 3 in flash will open image 3.

last you type this after closing the < /script >
note:  remember to add < to the front and > to the end.

a id="name_of_id1" href="file1.jpg" rel="shadowbox[name_of_gallery];options={counterType:'skip',continuous:true,animSequence:'sync'}"></a

replace name_of_id to the name you given back in the javascript to call the gallery and replace name_of_gallery to what ever you want to name the gallery.
You have to add each this each img file you are opening and after name_of_id add a number which is the order you given it to the javascript.

my website is www.calebrightnowar.com but go here www.calebrightnowar.com/calebrightnowarmain.htm for the source code for an example how its used for the javascript
Reply | Threaded
Open this post in threaded view
|

Re: shadowbox from flash, navigation missing

DgAPc
also I don't know if these still occurs or not but when I did this back in 2.0 you had to use the same code for a single image.  trying the gallery image first and then opening the single image the way you had it would cause the buttons to not work no more.  all you need to do is just add one line like

f[1] = "file1.jpg";

and it will automaticaly reconize it as a single image still.
Reply | Threaded
Open this post in threaded view
|

Re: shadowbox from flash, navigation missing

DgAPc
In reply to this post by leerraum
leerraum wrote
*bump*

nobody? can't believe thats the first time something like this happens...
Its actually common issue.  I've only seen one post where someone solved this and did it a different way.  One thing my javascript does compared to the other you can use flash to call a certain image you want but on his it always start at image 1
Reply | Threaded
Open this post in threaded view
|

Re: shadowbox from flash, navigation missing

leerraum
In reply to this post by leerraum
hi,

thank you very much for your reply and your time. thats a good solution, but the problem is layed out in another way. I build up a solution based on yours and some forum postings here.

theres an php file which generates a xml file containing a list of the images. so the gallery isn't of a fixed dimension. this xml file is called from flash. so flash knows all the images but html doesnt.

another problem was to open up image number n from the gallery.

my solution:
hand over the list to the shadowbox. with this solution you can use multiple galleries of variable length.

The Actionscript 2 part looks like this (AS3 looks not like this, but you can do it yourself, I'm sure):

                                //setup the string for image links
                                var give:String= "";

                                // infostruc is an object with the links in it
                                for(var i = 0; i < infostruc.length; i++){
                                        //add links to the string, using | as delimeter
                                        give += "|"+infostruc[i].albumLink;
                                       
                                }
                                // call the shadowbox wrapper
                                getURL("javascript:openShadowbox('"+current+"','"+give+"');");

The Javascript part looks like this:

                <link rel="stylesheet" type="text/css" href="shadowbox.css">
                <script type="text/javascript" src="shadowbox.js"></script>
                <script type="text/javascript"> Shadowbox.init(); function openShadowbox(image, filelist){ var f = filelist.split('|'); // I used | as delimeter f.shift(); // because the first element is empty, you can do it better, I know var ding = new Array(); // make an array with all the links in it for(var i = 0; i<f.length; i++){ ding.push({player: 'img', content: f[i], title: ''}); // push objects into array } Shadowbox.open(ding); // open the galley Shadowbox.change(image); // goto the specified image } </script>
Cheers
Reply | Threaded
Open this post in threaded view
|

Re: shadowbox from flash, navigation missing

maredeath
In reply to this post by DgAPc
hi
i need flash multiple photo galley sample fla

pls help me

e-mail:maredeath@gmail.com