tags:

views:

266

answers:

2

I'm planning to use flash image rotator based on xml where are defined paths from all images that will be rotated. What I wanted to do is to use this rotator for random images rotating. Each time page is refreshed new xml file is created (existing one is replaced with new one). Well, I was thinking and came to this: - user A visits page, a xml file is created with paths to some random 10 images, images are starting to rotate - while user A is watching slideshow, user B comes to page and then existing xml is being replaced with new one. Will this effect user's A slideshow?

To be more concrete: Does flash file first reads whole xml file, stores it in it's memory and reads from memory or it reads first line of xml and executes it, then second line and executes it and so on...

+1  A: 

Reads the whole thing. You'll be safe with what you've got. You might want to add a cache breaker to the end of the XML request too by attaching a random number on the end of the query string:

www.myserver.com/xml.asp?random=189473737

Pete Duncanson
A: 

@ Pete Duncanson First, thanks for answering so fast :)

I'm not pretty sure if I understood you... this is example xml of jw flash rotator in which I inserted random query at the bottom of xml file:

<?xml version="1.0" encoding="utf-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/"&gt;
    <trackList>

     <track>
      <title>Predvečerje na Starom Gradu</title> 
      <location>http://localhost/sinj.com.hr/rotator/home/1.jpg&lt;/location&gt;
     </track>

     <track>
      <title>Kamičak - kula sa ugrađenim satom</title> 
      <location>http://localhost/sinj.com.hr/rotator/home/2.jpg&lt;/location&gt;
     </track>

     <track>
      <title>Pijaca - središnji trg</title> 
      <location>http://localhost/sinj.com.hr/rotator/home/3.jpg&lt;/location&gt;
     </track>

     <track>
      <title>Detalj sa ulaznih vrata u Crkvu</title> 
      <location>http://localhost/sinj.com.hr/rotator/home/4.jpg&lt;/location&gt;
     </track>

    </trackList>
</playlist>
http://localhost/sinj.com.hr/?random=123987123

Is this correct or "end of the XML request" is some other location? Thanks, Ile

ile
Ahh no, you ideally want the flash file to add it to the end of the url for the XML file when it requests it. If you are using JW though you should not have to worry about it. One point to note, you could use the built in shuffle/random settings in JW and save yourself some pain, see the details here http://developer.longtailvideo.com/trac/wiki/ImageRotatorVars
Pete Duncanson
I don't plan to use JW but I never thougjt about using shuffle this way (to put all images in xml and then shuffle will do it's job) - I always limited number of shuffled photos, but there is no need to do it :)Thanks!
ile