This is my first brave attempt at tweening using all actionscript, so bare with me!
Here is my issue:
I click on the booking link and everyhing loads just fine, however, if I click on it again it only loads partially. Can anyone tell me why this is and how to resolve?
Here is the link:
http://laughwithlarry.com/index.swf
Here is the AS for the booking button:
on(release){
unloadMovieNum(2);
loadMovieNum("booking.swf",2);
}
The AS for the booking page:
stop();
setInterval(fadeInFunction, 800);
counter = 0;
function fadeInFunction() {
counter++;
_root.Increment(counter, 100, 2);
}
function Increment(count, maxAlpha, speed) {
_root.onEnterFrame = function() {
_root["MovieClip"+count]._alpha += speed;
if (_root["MovieClip"+count]._alpha>=maxAlpha) {
_root["MovieClip"+count]._alpha = maxAlpha;
delete _root.onEnterFrame;
}
};
}
**Also, here is the code for the index page where the links fade in:
**
loadMovieNum("home.swf",2);
setInterval(fadeInFunction, 800);
counter = 0;
function fadeInFunction() {
counter++;
_root.Increment(counter, 100, 2);
}
function Increment(count, maxAlpha, speed) {
_root.onEnterFrame = function() {
_root["MovieClip_mc"+count]._alpha += speed;
if (_root["MovieClip_mc"+count]._alpha>=maxAlpha) {
_root["MovieClip_mc"+count]._alpha = maxAlpha;
delete _root.onEnterFrame;
}
};
}
var colorful = new Color(_root.MovieClip_mc3);
MovieClip_mc3.onRollOver = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha += speed;
if (this._alpha>=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc3) {
_alpha = 50;
Increment(100,4);
}
};
MovieClip_mc3.onRollOut = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc3) {
_alpha = 100;
Increment(50, 4);
}
};
var colorful = new Color(_root.MovieClip_mc4);
MovieClip_mc4.onRollOver = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha += speed;
if (this._alpha>=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc4) {
_alpha = 50;
Increment(100,4);
}
};
MovieClip_mc4.onRollOut = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc4) {
_alpha = 100;
Increment(50, 4);
}
};
var colorful = new Color(_root.MovieClip_mc5);
MovieClip_mc5.onRollOver = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha += speed;
if (this._alpha>=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc5) {
_alpha = 50;
Increment(100,4);
}
};
MovieClip_mc5.onRollOut = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc5) {
_alpha = 100;
Increment(50, 4);
}
};
var colorful = new Color(_root.MovieClip_mc6);
MovieClip_mc6.onRollOver = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha += speed;
if (this._alpha>=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc6) {
_alpha = 50;
Increment(100,4);
}
};
MovieClip_mc6.onRollOut = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc6) {
_alpha = 100;
Increment(50, 4);
}
};
var colorful = new Color(_root.MovieClip_mc7);
MovieClip_mc7.onRollOver = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha += speed;
if (this._alpha>=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc7) {
_alpha = 50;
Increment(100,4);
}
};
MovieClip_mc7.onRollOut = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc7) {
_alpha = 100;
Increment(50, 4);
}
};
var colorful = new Color(_root.MovieClip_mc8);
MovieClip_mc8.onRollOver = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha += speed;
if (this._alpha>=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc8) {
_alpha = 50;
Increment(100,4);
}
};
MovieClip_mc8.onRollOut = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc8) {
_alpha = 100;
Increment(50, 4);
}
};
var colorful = new Color(_root.MovieClip_mc9);
MovieClip_mc9.onRollOver = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha += speed;
if (this._alpha>=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc9) {
_alpha = 50;
Increment(100,4);
}
};
MovieClip_mc9.onRollOut = function() {
MovieClip.prototype.Increment = function(maxAlpha, speed) {
this.onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=maxAlpha) {
this._alpha = maxAlpha;
delete this.onEnterFrame;
}
};
};
with (MovieClip_mc9) {
_alpha = 100;
Increment(50, 4);
}
};
Thanks for your time!