Chaotic Horde

Flash Applications and Games Development

Today,  

i have a thumbnail gallery that changes the thumbnail randomly with fade in and out with alpha. my problem is that after about a minute it starts to slow down. so i use BitmapData and i tried to use dispose() but it didnt work. since i never used it before i dont know how to fix my problem:
i am creating the thumbnail with this:(my thumbnails are in the library with linkage)
Code:

function picA0() {
this.createEmptyMovieClip("targetClip0", this.getNextHighestDepth());
targetClip0._x = 22;
targetClip0._y = 13;
i = random(j);
var pict:BitmapData = BitmapData.loadBitmap("pic"+i);
this.targetClip0.attachBitmap(pict, 1);
}


and from a MC that works as the timer i start a function that dissolves’ like this:

Code:

function fadeOut(param) {
this.onEnterFrame = function() {
if (_root["targetClip"+param]._alpha>0) {
_root["targetClip"+param]._alpha -= 10;
_root["targetClipB"+param]._alpha += 10;
} else {
_root["targetClip"+param].dispose();
_root["pic"+param+"state"] = false;
_root["picA"+param]();
this.timer.play();
delete onEnterFrame;
}
};
}


i tried to add a dispose after the else but its not doing anything


(Link)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • Furl
  • StumbleUpon

Posted in Flash Application and Games Development |

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.