Using images that can automatically change based on your needs
If you want to place an image in your Sprout that you want rotated out, you can use a dynamic image. First create a script that returns an image. Then add &t=t.jpg to the end of your script's URL (Sprout requires that the last 4 digits of an image be .jpg/.png/.gif). The script I wrote for the Kanu widget is:
http://www.kanuhawaii.org/xxx/getThumbnail.php?position=1&t=jpg
Position 1 means get the latest member. If I changed that to position 2 it would be the second newest member. I then created ten image boxes each with the same URL above except for the position number. When run, the script redirects to the correct jpg file based on the position number. (Note this script above won't run as I changed a couple of things for security reasons).


h4x0r!
Wicked, wicked, wicked awesome.
For those of us that are newbies that sounds awesome but very intimidating.
Here another idea that could improve upon this:
someone logs into your website
store their session cookie in their browser
they navigate to a page with a sprout on it
that sprout contains an asset like the one above, but your script also checks for the session cookie and returns an image depending on the cookie... of that particular user
i wish i had time to test this theory out. any volunteers? :)
I've done something similar to this on different occasions using FlashMX™; thus the theory is sound. However, it would more than likely be a better choice to track the username through a database connection.
Cookies are controlled by the enduser and don't give the site owner full control; as they can be easily deleted or even turned off. Some sites 'force' the enduser to turn cookies on; yet, this seems counter productive from a sales point because the cookies being turned off in the browser would have been 'deliberate' (not an accident).
Tracking the actual username allows the site owner to not only have full control, but would also open other opportunities to port more information; (from the database); to the Sprout. Thus making it even more interactive and engaging to the enduser.
Hope this helps...
tecHead
for some of us not so techy people can we get some one to go into a little more detail on this?
Using sessions will not work because the widgets use a proxy. Your server never sees the actual viewers at all.
thanks for posting this tip... it is just what I was trying to figure out.
Is it possible to pass in the image URL as one of the parameters in the embed code? This is a bit more flexible.
Hello Danny,
I'm sorry, we're don't currently support letting you customize your embed code with flashvars, however that has been a hot topic and we are investigating ways to do this in the future. Please stay tuned.
Post new comment