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

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

var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());

Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00001411.html