What i’m trying to do is : dynamically create an mc and fill it with pattern from library and then slide that mc a little bit using mc_tween but it doesn’t work so i will appreciate some help. That mc with pattern is used like a background and will be bigger than stage so with sliding it a little bit i am infact trying to create shake effect on the background. This is my basic code, pattern is displayed but sliding doesn’t work and I think the problem is that i can’t fill mc with pattern this way so mc stays empty and can’t be tweened (that’s my guess) but i can’t find solution:
#include "mc_tween2.as"
import flash.display.*;
var bg:BitmapData = BitmapData.loadBitmap("pattern");
this.createEmptyMovieClip("back_mc",this.getNextHighestDepth());
function fillBG(){
with(back_mc){
this.beginBitmapFill(bg);
this.moveTo(0,0);
this.lineTo(Stage.width,0);
this.lineTo(Stage.width,Stage.height);
this.lineTo(0,Stage.height);
this.lineTo(0,0);
this.endFill();
}
}
fillBG();
back_mc.ySlideTo(back_mc._y+100,3);
And .fla is HERE!
Thanks a lot