Re: [SWFObject] Slideshow with swfobject 2.2 - Dynamic images

334 views
Skip to first unread message

Sam Sherlock

unread,
Sep 13, 2012, 6:37:52 PM9/13/12
to swfo...@googlegroups.com, master...@gmail.com
1) I would not put the script within the body of the document (put it in the head)
2) use a tool that shows 404 errors of requests*
3) I would use xml to provide the swf with the list of images to show (if you simply must pass all the images via flashvars then you can but its gonna get chaotic)
4) Your alt content should be in the target div (flashDiv in your case). Then if the browser has js enabled and swfobject checks version is correct (above 9) the alt with flashDiv is replaced

This is not truly a swfobject issue more of a flash authoring general issue, this question does come up alot in various guises
point 2 is likely the cause the images not being found. It would be helpful for others wishing to help you if you could provide a link to your project (asp code clouds the issue your asking)
Look at the path being output, compare with where the image actually is the correct url of the image (make required changes - serverside ie ASP)
I would use absolute image paths as it makes life easier (or does for me - but then I would also be using xml)

you could set a js var for customer path and assign the ASP var to it & if the images are sequential use a for loop to set the flashvars (check also that your not missing a '/' with the paths -- you dont have a slash after CustomerPath but do after TemplatePath)

the expressinstall swf might need the TemplatePath var too (and reusing the asp short tag stuff is a touch messy you could set 2 js vars and reuse them accordingly)
 
if you are using relative paths then make the path is relative to the
On 13 September 2012 22:33, Patrice Cledo <patric...@homes.com> wrote:

Hi All,
   I am trying to display a slideshow using swfobject 2.2.I need the slides path to be dynamic like s1image1="<%=CustomerPath%>template_files/slide1.jpg".s1image2="<%=CustomerPath%>template_files/slide2.jpg".I am using dynamic publishing. Below is how I tried to do that but it is not working.Hope someone can help me get out.
Please help me!!!!!!   

<div id="SlideShow">
<div id="flashDiv"></div>
<script language="javascript" type="text/javascript">
var flashvars = {};
                                 flashvars.s1image0="<%=CustomerPath%>template_files/slide1.jpg";
flashvars.s1image1="<%=CustomerPath%>template_files/slide2.jpg";
flashvars.s1image2="<%=CustomerPath%>template_files/slide3.jpg";
flashvars.s1image3="<%=CustomerPath%>template_files/slide4.jpg";
flashvars.s1image4="<%=CustomerPath%>template_files/slide5.jpg";


var params = {
  menu: "false",
  wmode:"transparent",
  scale: "exactfit",
  align: "left",
  inshadow: "",
  croppit: ""

};
var attributes = {};
attributes.id = "flashDiv";
  swfobject.embedSWF("<%=TemplatePath %>/slidemc.swf", "AlternativeContent", "874", "206", "9.0.0","expressInstall.swf",false, flashvars, params, attributes);
    
</script>
</div>

<div id="AlternativeContent">
</a>
</div>

--
You received this message because you are subscribed to the Google Groups "SWFObject" group.
To view this discussion on the web visit https://groups.google.com/d/msg/swfobject/-/V487yTaMs0gJ.
To post to this group, send email to swfo...@googlegroups.com.
To unsubscribe from this group, send email to swfobject+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.

Sam Sherlock

unread,
Sep 13, 2012, 6:39:46 PM9/13/12
to swfo...@googlegroups.com, master...@gmail.com
[hit send to soon]
... html document not the swf sourced by document (or use abs paths as that saves the headache - some may say creates another :))
 - S

Sam Sherlock

unread,
Sep 14, 2012, 3:30:19 PM9/14/12
to swfo...@googlegroups.com, master...@gmail.com
the link is using 1.x which worked in inline js blocks (with 2.x this will be inconsistent or will fail - put the js in head)
the paths are absolute & you should be able to adjust the 1.x in to 2.x syntax real easy.

The original code you posted may work when placed in the head.  Please post back when you have updated the code or put a test page up

atb  - S




On 14 September 2012 15:40, masterxunil <patric...@homes.com> wrote:
Here is a link http://www.hazaelshomes.com/ where the code below is used.I am gonna make some changes based ion your recommendation.
To view this discussion on the web visit https://groups.google.com/d/msg/swfobject/-/u7f9AEHQJ_wJ.

masterxunil

unread,
Sep 24, 2012, 9:35:05 AM9/24/12
to swfo...@googlegroups.com, master...@gmail.com
I have downgraded the swfobject to version 1.4.4 and put everything in the header but still I have that site martincountyrealestate.com that is not working.
Please have a look at it,I need  a glue to get rid of that slideshow problem.

Sam Sherlock

unread,
Sep 24, 2012, 8:28:37 PM9/24/12
to swfo...@googlegroups.com
works for me in chrome but firefox has issues. It seems to not play from first frame.

why are you using 1.4? I think you would be better of with version 2
 - S




To view this discussion on the web visit https://groups.google.com/d/msg/swfobject/-/SPjXURGY_mMJ.
Reply all
Reply to author
Forward
0 new messages