Skip to main content
May 13, 2010
Question

How to pass images through URL

  • May 13, 2010
  • 1 reply
  • 676 views

hi,

I have created a photogallery,in this gallery i passed images through using XML, but now i want to pass images though URL,

m attaching my photogallery JPG.

can u plz help me,

Thanks,

JaxNa

This topic has been closed for replies.

1 reply

May 13, 2010

plz help me...

Inspiring
May 13, 2010

you could do the following:

assuming you got something like

"gallery.htm?images=photo1.jpg,photo2.jpg,..."

you could use php to read those

var $imgs = $_GET['images'];

and then let PHP write the code to embed the swf, inserting those image adresses, so the whole thing should look something like this:

(assuming you embed with swfObject)

<?php

     var $imgs = $_GET['images'];

     echo " <script type='text/javascript'>

     swfobject.addDomLoadEvent( function(){ document.getElementById('nojs').style.display = 'none'; });

     var flashvars = {images:".$imgs"};

     swfobject.embedSWF('container.swf', 'nofla', '815px', '520px', '10.0.0', '', flashvars, {wmode:'transparent', scale:'noscale', allowFullScreen:'true', allowScriptAccess:'always'}, {id:'flash'});

     </script>"

?>

then in flash

you can acces the variable's content via

root.loaderInfo.parameters["images"];

but remember that length of http-Headers is limited...

May 13, 2010

Thanks a lot..