Astuces Développeur Multimédia

Aller au contenu | Aller au menu | Aller à la recherche

vendredi 27 mai 2011

Draw / copyPixels - cropping BitmapData

var bitmapData_1:BitmapData=new BitmapData(MovieClip(root).width,MovieClip(root).height); // generate bitmapData with root size
image.draw(MovieClip(root)); // drawing the BitmapData (root image)
var posX:uint = posY:uint  = 0;
var recWidth:uint = recHeight:uint = 100;
var bitmapData_2:BitmapData=new BitmapData(recWidth, recHeight); // generate second BitmapData with the width/height we want
bitmapData_2.copyPixels(bitmapData_1, new Rectangle(posX, posY, recWidth, recHeight), new Point(0,0)); // put the image into the second BitmapData and draw from 0,0 top left

jeudi 28 avril 2011

Open source debugger actionscript/flex - Monster

Monster Debugger is an open source debugger for Adobe Flash, Flex and AIR It is made in Flex and AIR
  • MonsterDebugger.inspect(foo); // inspect function sets the target of the application
  • highlight & inspect mode // set that DisplayObject as the target for the Monster Debugger
  • MonsterDebugger.trace(this, foo); // can trace Class/Object/Array ...
  • MonsterDebugger.trace(this, "ERROR!", "", "", 0xFF0000); // tracing an error
  • MonsterDebugger.breakpoint(this); // player will be turn in pause
  • MonsterDebugger.snapshot(this, myMovieClip); MonsterDebugger.snapshot(this, myBitmap, "mybitmal", "interface"); // snapshot
Give a try, you will be addicted

mercredi 27 avril 2011

Retrieve more than one time copies of Bitmap by using loaderMax (GreenSock)

var item:DisplayObject = LoaderMax.getContent('Element');
item.rawContent.bitmapData.clone();
http://www.greensock.com/loadermax/

jeudi 8 janvier 2009

TweenMax (AS3) - TweenLite on Steroids

http://blog.greensock.com/tweenmaxas3/

Framework flash

I will try this framework very soon, it's seems a good one.
http://www.gaiaflashframework.com/