开发者

unable to add dynamic images in flash image gallery( Joomla Module )

开发者 https://www.devze.com 2023-01-11 11:10 出处:网络
i m using flash on a module of Joomla to display images, i embed flash player code into javascript , it fetch images from an XML files wher images are predefined and it works fine,

i m using flash on a module of Joomla to display images, i embed flash player code into javascript , it fetch images from an XML files wher images are predefined and it works fine, now i have a problem that i m collecting images from database, means images are dynamically, so i m unable to fetch that images an display on flash, i just want to knoe how to add dynamic image array into flash. do i need to create xml??

here is my code sample

<div id="slider"></div>
    <script type="text/javascript"> 
         var so = new SWFObject("http://localhost/projectname/modules/mod_photo_gallery2/gianniconti.swf", "slider", "942", "开发者_如何学编程477", "8", "#000000");         
        so.addVariable("xml_path","http://localhost/projectname/modules/mod_photo_gallery2/gianniconti.xml"); 
        so.addParam("wmode", "transparent"); 
        so.write("slider");     
    </script>
    <?php foreach ($photos as $photo) { // $photos  containing images path ( fetch from db) ?>   
    <img src="http://localhost/projectname/components/com_user/views/images/thumbnail/<?php echo $photo->thumbnail;?>" width="100" height="100">
    <?php }?>
         ......
         ......

Please help me ASAP,

Thanks


if you want to avoid getting into the flash code, you would need to serve an xml to the flash player. in order to do that you can retrieve your image data from the database and use php to create an xml that you can then assign to flash via the SWFObject addVariable function

check this tutorial: http://www.kirupa.com/web/mysql_xml_php.htm

0

精彩评论

暂无评论...
验证码 换一张
取 消