Ok. this is a new problem for me. I have an swf that loads images from a directory within the site. If I click on a link that takes me to the site, the images load. If I then try to refresh, the images no longer load. What the hell…
Here’s my mess of as2.0 (I understand much of it is of no consequence to this problem, but wanted to make sure I had it all here for you) Thanks for any light anyone can shine apon this problem:
var loaded:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
/////////////////////////////////////////////////////////////////////////////////////
var Image1:String = "images/flash/play_9.jpg";
var Image2:String = "images/flash/play_ace.jpg";
var smimg1:String = "images/flash/play_img1.jpg";
var smimg2:String = "images/flash/play_img2.jpg";
var smimg3:String = "images/flash/play_img3.jpg";
//////////////////////////////////////////////////////////////////////////////////////
//var back_screen:MovieClip = this.createEmptyMovieClip("back_screen", 1);
var bg_img:MovieClip = this.createEmptyMovieClip("bg", 50);
var bg_img2:MovieClip = this.createEmptyMovieClip("bg2", 49);
var small1:MovieClip = this.createEmptyMovieClip("sm1", 20);
var small2:MovieClip = this.createEmptyMovieClip("sm2", 30);
var small3:MovieClip = this.createEmptyMovieClip("sm3", 40);
//////////////////////////////////////////////////////////////////////////////////////
//back_screen.beginFill(0x000000,100);
//back_screen.lineTo(800,0);
//back_screen.lineTo(800,268);
//back_screen.lineTo(0,268);
//back_screen.lineTo(0,0);
//////////////////////////////////////////////////////////////////////////////////////
//back_screen._alpha = 0;
bg_img._alpha = 0;
bg_img2._alpha = 0;
small1._alpha = 0;
small2._alpha = 0;
small3._alpha = 0;
//////////////////////////////////////////////////////////////////////////////////////
loaded.loadClip(Image1,bg_img);
loaded.loadClip(Image2,bg_img2);
loaded.loadClip(smimg1,small1);
loaded.loadClip(smimg2,small2);
loaded.loadClip(smimg3,small3);
///////////////////////////////////////////////////////////////////////////////////////
function load_the_three() {
small2._x = 252;
small3._x = 508;
small1.onEnterFrame = function() {
this._alpha += 2;
if (this._alpha>=100) {
delete this.onEnterFrame;
}
if (this._alpha>=25) {
small2.onEnterFrame = function() {
this._alpha += 2;
if (this._alpha>=100) {
delete this.onEnterFrame;
}
if (this._alpha>=25) {
small3.onEnterFrame = function() {
this._alpha += 2;
if (this._alpha>=100) {
attachMovie("grand_statement","grand_statement",100,{_x:331, _y:210});
three_sat = setInterval(fading_up1, 5000);
delete this.onEnterFrame;
}
};
}
};
}
};
}
function fading_up1() {
fading_up_last = setInterval(fading_up2, 10);
clearInterval(three_sat);
}
function fading_up2() {
bg_img._alpha++;
if (bg_img._alpha>=100) {
clearInterval(fading_up_last);
bg_img2._alpha = 100;
curr_image = "9";
switching = setInterval(switch_pics, 10000);
}
}
function fading_up3() {
bg_img._alpha--;
if (bg_img._alpha<=0) {
clearInterval(fading_up_last);
curr_image = "a";
}
}
function switch_pics() {
if (curr_image == "9") {
fading_up_last = setInterval(fading_up3, 20);
}
if (curr_image == "a") {
fading_up_last = setInterval(fading_up2, 20);
}
}
mclListener.onLoadProgress = function(target_mc:MovieClip, numBytesLoaded:Number, numBytesTotal:Number):Void {
mc1perc_loaded = (Math.ceil((numBytesLoaded/numBytesTotal)*100));
if (target_mc == _level0.bg) {
barz.gotoAndStop(mc1perc_loaded);
if (mc1perc_loaded>=100) {
barz.play();
load_the_three();
//fading_up = setInterval(fading_up2, 20);
}
}
};
mc1Listener.onLoadComplete = function(target_mc:MovieClip):Void {
trace("Done");
};
loaded.addListener(mclListener);