lufylegend库 LBitmapData LBitmap LSprite
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>lufylegend</title> <script type="text/javascript" src="lufylegend-1.7.6.js"></script> </head> <body> <div id="mylegend">loading...</div> <script type="text/javascript"> var loader; init(50, 'mylegend', 500, 350, main); function main() { loader = new LLoader(); loader.addEventListener(LEvent.COMPLETE, loadBitmapdata); loader.load('face.jpg', 'bitmapData'); } function loadBitmapdata(event) { // var bitmapData = new LBitmapData(loader.content,50,50,150,150); var bitmapData = new LBitmapData(loader.content); var bitmap = new LBitmap(bitmapData); // bitmap.x = 50; // bitmap.y = 50; // bitmap.rotate = 60; // bitmap.alpha = 0.4; // addChild(bitmap); var layer = new LSprite(); addChild(layer); layer.addChild(bitmap); // layer.x = 50; // layer.y = 50; // layer.rotate = 60; } </script> </body> </html>