We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

damarev on 01/25/08


Tagged

effects as2


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

jmelgoza


movieclip with mirror effect


Published in: ActionScript 


URL: http://www.cristalab.com/foros/t22148-150.html

  1. import flash.geom.*;
  2. import flash.display.*;
  3. function espejo(mc){
  4. w=mc._width*100/mc._xscale; h=mc._height*100/mc._yscale;
  5. b = new BitmapData(w, 2*h, true, 0);
  6. t = createEmptyMovieClip("p2",100002);
  7. M = new Matrix(); M.scale(1,-1); M.ty = 2*h;
  8. Mx = new Matrix(); Mx.createGradientBox(w,h,1.57,0,0);
  9. t.beginGradientFill("linear",[0,0,0],[100,80,10],[100,160,255],Mx);
  10. t.moveTo(0,0);t.lineTo(0,h);t.lineTo(w,h);t.lineTo(w,0);t.endFill();
  11. b.draw(mc,M); b.draw(t,M,null,12); t.removeMovieClip();
  12. mc.attachBitmap(b,2);
  13. }

Report this snippet 

You need to login to post a comment.