Hey folks, working with an ooooooold AS2 file that now inexplicably blinks when it loops. It didn't used to and I'm not sure what I broke.
Here's the breakdown - I call external jpg assets into the swf via external txt files. It works fine but blinks as it loops from the last frame to the first.
Bagh, it wont open on my laptop.
Have you tried putting an action on the frame before the last one, sending it back to 1? If that doesnt work put the action on the last frame and send it back to 2.
Neither of those seems to work.
I resaved the fla as cs4 -
www.greynotgrey.com/ian/12stone/tmp/NARStoreBanner_en.zip
I think it may be because I'm loading the files externally but I've done this before without blinking issues so I'm somewhat stymied.
Haven't written AS2 in years, so it might be a bit sloppy.
This approach removes the reliance on the timeline, which in my experience, when mixed with actionscript becomes a nightmare.
Also, you can provide a flashvar called "lang" when you embed your swf, and that will choose which files to load for the images and urls.
A.
edit
This uses the same files you originally provided in the zip, so just run the fla from the same location as NARStoreBanner_en.fla and you should be gold.
OOH pretty...
I'll dig into it further on the morrow.
Well, that did fix the blink but none of the link actions seem to be working, i.e.; I click on the swf and nothing loads. The flash code looks like it should work (in principle)
FWIW here's the code so others can see what's going on and perhaps recognize the issue...
import mx.utils.Delegate;
var language : String = _level0.lang || "fr";
var urlPath : String = "url_" + language + ".txt";
var imagePath : String = "images_" + language + ".txt";
var urls : Array = [];
var images : Array = [];
var currentLoader : MovieClipLoader;
var oldLoader : MovieClipLoader;
var holder : MovieClip = createEmptyMovieClip("holder", 0);
var index : Number = 0;
var urlLoader : LoadVars = new LoadVars();
urlLoader.onLoad = Delegate.create(this, onUrlsLoaded);
urlLoader.load ( urlPath );
var imageLoader : LoadVars = new LoadVars();
imageLoader.onLoad = Delegate.create(this, onImagesLoaded);
var switcherID : Number;
launchBtn.onPress = Delegate.create(this, onLaunchPressed);
function onLaunchPressed ( )
{
var currentURL : String = urls [ index ];
trace ( "Launching " + currentURL );
// getURL( currentURL );
}
function onUrlsLoaded ( success )
{
urls = [ urlLoader.url1, urlLoader.url2, urlLoader.url2 ];
imageLoader.load ( imagePath );
}
function onImagesLoaded ( success )
{
images = [ imageLoader.hero1, imageLoader.hero2, imageLoader.hero3 ];
loadImageAt(0);
startTimer();
}
function loadNext()
{
index++;
if ( index >= images.length ) index = 0;
loadImageAt(index);
}
function startTimer()
{
switcherID = setInterval(loadNext, 5000);
}
function loadImageAt( index )
{
this.index = index;
if ( currentLoader ) oldLoader = currentLoader;
var child : MovieClip = spawnChild();
currentLoader = new MovieClipLoader();
currentLoader.addListener ( this );
currentLoader.loadClip ( images[index], child );
}
function spawnChild() : MovieClip
{
var clip : MovieClip = holder.createEmptyMovieClip("image_" + holder.getNextHighestDepth(), holder.getNextHighestDepth() );
trace ( ">> " + clip );
return clip;
}
function onLoadComplete ( clip )
{
trace ( clip + ' loaded' );
if ( oldLoader )
{
oldLoader.unloadClip()
}
}
function onLoadError ( clip )
{
trace ( "error" );
}
Just uncomment the getURL() call inside onLaunchPressed() and you should be golden. It just traces the link at the moment
You, sir, are a gentleman and a scholar.

One more thing, you're probably going to get the same URL for the last two images, because I'm using url2 from the data file twice. Just change that last url2 to url3 inside onUrlsLoaded()
Yeah, I fixed that 