When you place an swf in an html page, the html page becomes its basis of reference for anything it loads, so if your swfs are all in another folder than the html file, then you need to adjust the targeting inside CJRandom.swf to be as if it lives in the same directory as the html file.
So if you use... images/FlashMovies/CJRandom.swf
to load the CJRandom.swf fle into the web page, then you need the CJRandom.swf file to also use the images/FlashMovies/ to target the swfs it loads.
Thanks for your help on this. Apologies if I'm asking the obvious here.
Here is my coding again:
// Sets the number of Flash Movies in the random sequence
// IMPORTANT: Set this number to how many Flash Movies you have
var myMovieSequence = 30;
// Creates the random number:
var myRandomNumber = Math.floor(Math.random()*myMovieSequence)+1;
// Creates the full Flash Movie name like: 1.swf
var myMovieName = "/Images/FlashMovies/CJFlash" + myRandomNumber + ".swf";
// Loads the random Flash Movie:
I have changed the third line to include the path (i.e. /Images/FlashMovies...), but this generates an error:
Error opening URL 'file:///Images/FlashMovies/CJFlash4.swf' (or whatever the randomly generated file is).
I would imagine this is because it is trying to read the file as /Images/FlashMovies/Images/FlashMovies/CJ.... What do I need to change to make this work? Sorry if I seem a bit dense - I hate asking questions but want to get this knocked on the head.