Hi,
in general:
* follow the KISS principle
* optimize l8r
* measure if you really want to know and base your decision on that

greetz
JC


On 7/25/07, ilteris kaplan <[EMAIL PROTECTED]> wrote:

Hey Flashcoders,

I am creating an empty movieclip and loading an image to it. Then I
am basically copying this movieclip into a bitmap. The reason I am
doing this is, in the next step I am slicing up the bitmap into
different pieces. I think my question is, am I doing an additional
step first copying the whole movieclip into a whole bitmap? Can I
just slice it up into pieces of bitmap from its movieclip stage?

A friend of mine mentioned about just slicing it up with draw()
method instead of copyPixels(). What would you guys recommend?
Thanks in advance.



_root.createEmptyMovieClip("tempMC",1,{_alpha:0});

var theLoader:MovieClipLoader = new MovieClipLoader();
var theListener:Object = new Object();
theLoader.addListener(theListener);

theListener.onLoadInit = function(mc:MovieClip) {
       bitmapPic = new BitmapData(_root.tempMC._width,
_root.tempMC._height);
       bitmapPic.draw(mc,new Matrix());
       // draw(bigPicture, null, null, null, new Rectangle(0, 0, 50,
100));
       _root.tempMC.removeMovieClip();


       for (var i:Number = 0; i<totalNumPieces; i++) {
               lizPiece = new BitmapData(pieceWidth, pieceHeight);
               lizPiece.copyPixels(bitmapPic,new Rectangle(x, y,
pieceWidth,
pieceHeight),new Point(0, 0));
               makeLizPiece(lizPiece,x,y,i);
               x += pieceWidth;
               if (x>=bitmapPic.width) {
                       x = 0;
                       y += pieceHeight;
               }
       }
};

theLoader.loadClip("liz.jpg",_root.tempMC);




_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to