You have to use the draw method for a bitmapData object to make a copy of a MovieClip/Textfield. You can only use the linkID on bitmaps in your library with the loadBitmap method.
That is true, but you can create a transparent Bitmapdata, which nobody sees and place it anywhere you want. Then you place the movieclip to be drawn outside your movie.
PHP Code:
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Matrix;
import flash.geom.ColorTransform;
var myBitmapData:BitmapData = new BitmapData (100, 80, true);
var mc_1:MovieClip = this.createEmptyMovieClip ("mc", this.getNextHighestDepth ());
mc_1.attachBitmap (myBitmapData, this.getNextHighestDepth ());
mc_1._x = 200;
mc_1._y = 200;
var mc_2:MovieClip = clip;
var myMatrix:Matrix = new Matrix ();
myMatrix.rotate (Math.PI / 2);
var translateMatrix:Matrix = new Matrix ();
translateMatrix.translate (70, 15);
myMatrix.concat (translateMatrix);
var myColorTransform:ColorTransform = new ColorTransform (0, 0, 1, 1, 0, 0, 255, 0);
var blendMode:String = "normal";
clip_2.onPress = function ()
{
myBitmapData.draw (mc_2, myMatrix, myColorTransform, blendMode);
};
- The right of the People to create Flash movies shall not be infringed. -
it just creates a blue rectangle...what I need though is for it to put on the screen a vector square which is in a clip, which ideally is in the library, not already on the stage......can't this be done using the bitmapData object??
the reason im asking this, is because I'm using a scroll engine that uses the bitmapData object, but insted of using bitmap tiles I want to use vector tiles..
It cannot just take an clip from the library (to my knowledge ), but needs to place an instance on stage. The blue rectangle is just what has been coded by the draw method. You can manipulate that as you like.
- The right of the People to create Flash movies shall not be infringed. -