Everything works like I want when I test it in Flash, but when I publish it and view in html, the first frame comes up fine, but all other frames display the background color (white). Whenever it loads I have it set to go to a random frame (1-8) and in each frame is a simple movie clip that just tweens the brightness from -100% to 0% (black to normal).
Below is the actionscript I have in the first frame.
var r:Number = Math.floor(Math.random()*7)+1;
_root.onLoad=function(){
this.gotoAndStop(r)
}
stop();
btn_next.onRelease = function () {
if (_root._currentFrame == 8) {
gotoAndStop(1)
}
else {
nextFrame();
}
}
btn_prev.onRelease = function () {
if (_root._currentFrame == 1) {
gotoAndStop(8)
}
else {
prevFrame();
}
}