Use of images in as3.0 library, and bitmap common properties

Source: Internet
Author: User

1.

If the pictures in the library are loaded into the display list, we can use the bitmap object to load the image.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/BE/wKioL1WFV1DxaDg6AADNCOZj8Rw366.jpg "title=" JSWGE) 4@QDEBLXBLNXYS8QS.png "alt=" Wkiol1wfv1dxadg6aadncozj8rw366.jpg "/>

such as tablets, I have a picture in the library and given the link named Mybitmap, how to use this image code as follows

Import Flash.display.bitmap;var Bitmap:bitmap = new Bitmap (new Mybitmap () as BitmapData); Bitmap.scalex = 0.5;bitmap.scaley =. 5;bitmap.x = 110;bitmap.y = 1;bitmap.rotation = 20;bitmap.alpha =. 5;this.addChild (bi TMAP);

Execution results are as follows

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/C2/wKiom1WFVivQVH-yAAJkE0MyfeY362.jpg "title=" 33u@6 " C_rk68l6oe]98i0vu.png "alt=" Wkiom1wfvivqvh-yaajke0myfey362.jpg "/>

2.

For a bitmap object, it inherits from Displayobject, so the public property of Displayobject is available, such as

X (relative to the x-axis position of the registration point), Y (relative to the y-axis position of the registration point), rotation (degrees of rotation), alpha (opacity), ScaleX (scaling in the x-axis direction), ScaleY (percentage of bloom in the y-axis direction), and bitmap its own smoothing (controls the smoothness of scaling)


Use of images in as3.0 library, and bitmap common properties

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.