
Untitled
By: a guest on
May 1st, 2012 | syntax:
None | size: 0.56 KB | hits: 15 | expires: Never
so a dialog has a backgroundFade sprite
black
and alpha is 0.5
backgroundFade = new Sprite();
backgroundFade.graphics.beginFill(0x000000, 0.5);
backgroundFade.graphics.drawRect(0, 0, Globals.get('screen_width'), Globals.get('screen_height'));
addChild(backgroundFade);
var tt = Globals.get('dialog_tween_time');
var t1 = new TweenLite(this.outerBox, tt, {y: dialogY});
var t2 = new TweenLite(this.backgroundFade, tt, {alpha: 1.0});
timeline.appendMultiple([t1, t2]);
timeline.play();
and then remove the backgroundFade
removeChild(backgroundFade);