Cool, still homeschooling my kids, so no hurry...thanks so much for the help, tho!
Cool, still homeschooling my kids, so no hurry...thanks so much for the help, tho!
Amy McCoy
Baby Gifts and Baby Gift Baskets
The package contains a file called swfobject.js
rename this file to: jscript_swfobject.js and place it in:
includes/templates/YOURTEMPLATE/jscript/jscript_swfobject.js
The code I use to embed the object is:
Be sure to replace YOURLOCATION with the proper directory relative to your web root.Code:<script type="text/javascript"> var flashvars = {}; flashvars.xmlFile = "<?php echo $current_xml; ?>"; flashvars.spacing = "5"; flashvars.smoothScrolling = "true"; flashvars.expandingDirection= "center"; flashvars.backgroundColor = "0"; flashvars.dockWidth = "602"; flashvars.dockHeight = "250" flashvars.autoScrollSpeed = "5"; flashvars.minThumbWidth = "50"; flashvars.minThumbHeight = "50"; flashvars.maxThumbWidth = "200"; flashvars.maxThumbHeight = "200"; flashvars.imagesInfluence = "500"; flashvars.fontSize = "14"; flashvars.reflectionSpread = "30"; flashvars.reflectionAlpha = "65"; flashvars.reflectionDistance = "1"; flashvars.useReflection = "false"; flashvars.tooltipPosition = "bottom"; flashvars.autoScrollSpeed = "1"; flashvars.tooltipBackgroundAlpha = "80"; var params = {}; params.scale = "noscale"; params.salign = "tl"; params.wmode = "transparent"; var attributes = {}; attributes.styleclass = "noOutline"; swfobject.embedSWF("YOURLOCATION/dockmenu.swf", "DockMenuDiv", "602", "250", "9.0.0", false, flashvars, params, attributes); </script> <div id="DocMenuDivWrapper"> <div id="DockMenuDiv"> <a href="http://www.adobe.com/go/getflashplayer"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /> </a> </div> </div>
Also, add to your stylesheet.css file:
That will prevent an ugly dotted line in Firefox when you click the object. This is loaded by the attributes.styleclass param (see above)Code:.noOutline { outline:none; }
Note I use the PHP varriable $current_xml to point to the XML file, but you can put the actual path here instead. I only do this because my XML files are created dynamically with unique names.
A sample XML entry would look like this:
Be sure to replace YOURIMAGEDIR with the proper path to your images.Code:<?xml version="1.0" encoding="ISO-8859-1"?> <dockmenu> <photo image="/YOURIMAGEDIR/200x200_95_CatsEye-F.jpg" url="/index.php?main_page=product_info&products_id=684" target="_self"><![CDATA[Cat's Eye <br />15% Off Today!]]></photo> <photo image="/YOURIMAGEDIR/200x200_95_bcd_img_7966.jpg" url="/index.php?main_page=product_info&products_id=4737" target="_self"><![CDATA[Who Rocks America <br />15% Off Today!]]></photo> </dockmenu>
The div DocMenuDivWrapper can be styled as you wish in your stylesheet. That is how I add the background image of the mountains behind the flash widget.
Also note you will need to adjust the height and width params to fit your site.
I know thats a big chunk to digest, but if I can clarify to help you get it working, just ask.
Digesting! I'll let you know how it goesThanks!
Amy McCoy
Baby Gifts and Baby Gift Baskets
OK, I've done the above items and I get a big blank where I'm supposed to have the widget, so we are making progress! Here is a snippet from my XML file:
Does that look ok? What might I be missing? Should the images.xml and dockmecu.swf be in the same folder as the define main page file as I have it?PHP Code:<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <dockmenu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <photo image="http://www.babygiftbasketstores.com/store/images/Cashmere_Bunny/ABBW-2.jpg" bigimage="http://www.babygiftbasketstores.com/store/images/Cashmere_Bunny/ABBW-2.jpg" url="http://www.babygiftbasketstores.com/store/all-boy-baby-wagon-p-2.html?currency=USD" target="_self" lightboxInfo="All Boy Baby Wagon">All Boy Baby Wagon</photo>
Amy McCoy
Baby Gifts and Baby Gift Baskets
Well, if you have a big blank area that is good. It means the widget is loading. If you right-click in the blank area it should say something about your flash options (just to confirm its loaded the flash)
I think your XML is kinda broken. The example I posted is from a working one.
I'd try copying that and editing it as closely as possible to use your own info. The way it's set up is so you can have a customer go to your detail page where the add-to-cart button is when one of the pictures is clicked.
I don't think the "lightbox" param is the same Zen Lightbox you are thinking.
Just a little off the wall, but here is another toy I'm playing with. But unlike the dock menu, this will be the entire store front. Handling categories (currently called albums) and products. Still needs a lot of work though...
http://www.laserdiscvault.com/ga1/index.php
This uses an XML interpretation of the ZC product data.
Awrighty, check out my page now: http://www.babygiftbasketstores.com/
Another step in the right direction, I think. I used my old images.xml and tried with the file I created using the XML code sample from you. Same thing happens. My problem from before was that I forgot a "/" in the path to the js file in my template. After fixing that, I get what you see whether I use the old XML or the new.
Using the code you gave me for the XML, gets me an error when I try to open it up in an XML editor or Excel....
Amy McCoy
Baby Gifts and Baby Gift Baskets
Could someone kindly help me out in getting this to work? It sounds like JUST what I need and I love that it will auto load the FLV files with corresponding Model Numbers.
I am using the Music product type so inserted the PHP code provided:
into tpl_product_music_info_display.php.<?php
$movie = $products_model;
$movie_file = "/home1/hopeless/public_html/havokdesigns/code/ss/dental/media/" . $movie . ".flv";
if(file_exists($movie_file))
{?>
<table align="center"><tr><td>
<script type="text/javascript">
AC_FL_RunContent(
'class','kimplayer',
'width','500',
'height','375',
'allowFullScreen','true',
'data','/FLVplayer/player_flv_maxi.swf',
'type','application/x-shockwave-flash',
'movie','/FLVplayer/player_flv_maxi',
'flashvars','flv=/media/<?php echo $movie; ?>.flv&configxml=/FLVplayer/config.xml' ); //end AC code
</script>
</td></tr></table>
<?php } ?>
I have an FLV file named TEST1 which is the model of my test product.
I download the zipfile containing the scripts,etc..but am at a loss of what to do with it. This thread kind of went into a tangent about something else so I'm confused!
Thanks!