8款很实用的Actionscript写的位图(BitMap)操作类

本文介绍了一系列针对Adobe Flash Platform的ActionScript 3 (AS3) 实用类库,包括用于创建可缩放UI元素的AS3Scale9Bitmap、实现像素马赛克效果的AS3bitmapmosaicclass、实现窗口模糊效果的ActiveWindowBlur等。这些工具简化了开发者的工作,尤其在用户界面设计和图像处理方面。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

AS3 Scale9 Bitmap


AS3 Scale9 Bitmap is helper class that lets you create scale9 sprites with bitmap data fill – originally this was not possible in Flash 9. The helper class creates a "fake" scale 9 sprite containing 9 shapes that scale according to user-defined scaling matrix. Extremely useful for user interface work (creating buttons, scalable UI elements etc.).

 

AS3 bitmap mosaic class

 


This class will allow you to create a pixellated copy of any display object. It allows for varying pixel sizes and caching of rendered pixels so you don’t have to redraw them every time.

 

Active Window Blur

 


It has detail code and examples show how the class works.

 

Animated Bitmap Class

 


The AnimatedBitmap class provides functionality for Bitmap objects that are animated by using a series of still images. When creating a new AnimatedBitmap you provide a BitmapData object that contains an image that consists of the ’single-frame’ images for the animation.

 

CollisionDetection Class

 


CollisionDetection class is really simple to work with, there is a single static method called checkForCollision with four parameters. movieClip1, movieClip2 – The MovieClip instances to check for collision. alphaTolerance – a number from 0 to 255 that specifies the transparency tolerance when testing the collision. A higher number will increase the tolerance (ie. allow more transparent parts of the MovieClip to register collisions). Defaults to 255.

 

DistortImage Class

 


It is an updated version of the original DistortImage class for AS2, which allows you to programmatically distort images.

 

ImageLoader

 


ImageLoader is a straightforward image loader. It simplifies the job of loading images by automatically creating a list of images being loaded, controlling its queue with priority features (by way of the LoadingQueue class), and by caching images locally using BitmapDatainstances. This means that when you try to load a new image, it actually loads the image, saves its BitmapData, and attaches the image to the container (with smooth turned on by default).

 

Reflection class

 


It is a simple class for creating a reflection below any type of displayObject in AS3.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值