EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Loadbitmap (Bitmapdata.loadbitmap Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BitmapData (flash.display.BitmapData) 317
currPoint.x = mc_2._x;
currPoint.y = mc_2._y;
if(myBitmapData.hitTest(destPoint, 255, currPoint)) {
trace(">> Collision at x:" + currPoint.x + " and y:" + currPoint.y);
}
}
mc_2.startDrag(true);
function createRectangle(width:Number, height:Number,
color:Number):MovieClip {
var depth:Number = this.getNextHighestDepth();
var mc:MovieClip = this.createEmptyMovieClip("mc_" + depth, depth);
mc.beginFill(color);
mc.lineTo(0, height);
mc.lineTo(width, height);
mc.lineTo(width, 0);
mc.lineTo(0, 0);
return mc;
}
loadBitmap (BitmapData.loadBitmap method)
public static loadBitmap(id:String) : BitmapData
Returns a new BitmapData object that contains a bitmap image representation of the symbol
that is identified by a specified linkage ID in the library.
Availability: ActionScript 1.0; Flash Player 8
Parameters
id:String - A linkage ID of a symbol in the library.
Returns
flash.display.BitmapData - A bitmap image representation of the symbol.
Example
The following example loads a bitmap with the linkageId
libraryBitmap from your library.
You must attach it to a
MovieClip object to give it a visual representation.
import flash.display.BitmapData;
var linkageId:String = "libraryBitmap";
var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId);
trace(myBitmapData instanceof BitmapData); // true

Table of Contents

Related product manuals