Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 0.56 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. so a dialog has a backgroundFade sprite
  2. black
  3. and alpha is 0.5
  4.  
  5. backgroundFade = new Sprite();
  6. backgroundFade.graphics.beginFill(0x000000, 0.5);
  7. backgroundFade.graphics.drawRect(0, 0, Globals.get('screen_width'), Globals.get('screen_height'));
  8. addChild(backgroundFade);
  9. var tt = Globals.get('dialog_tween_time');
  10. var t1 = new TweenLite(this.outerBox, tt, {y: dialogY});
  11. var t2 = new TweenLite(this.backgroundFade, tt, {alpha: 1.0});
  12.  
  13. timeline.appendMultiple([t1, t2]);
  14. timeline.play();
  15.  
  16. and then remove the backgroundFade
  17.  
  18. removeChild(backgroundFade);