Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
FlexMaterial.as
Package: dougmccune_coverflowlib.zip [view]
Upload User: chuer333
Upload Date: 2022-06-13
Package Size: 906k
Code Size: 1k
Category:
FlashMX/Flex
Development Platform:
Flex
- package com.dougmccune.containers.materials
- {
- import flash.display.DisplayObject;
- import flash.events.Event;
- import flash.geom.Matrix;
- import mx.core.Container;
- import mx.core.UIComponent;
- import mx.events.FlexEvent;
- import org.papervision3d.materials.MovieMaterial;
- public class FlexMaterial extends MovieMaterial
- {
- public function FlexMaterial(movieAsset:DisplayObject=null, transparent:Boolean=true)
- {
- if(movieAsset is UIComponent) {
- addUpdateListeners(UIComponent(movieAsset));
- }
- super(movieAsset, transparent, false);
- }
- private function addUpdateListeners(component:UIComponent):void {
- component.addEventListener(FlexEvent.UPDATE_COMPLETE, handleUpdateComplete, false, 10, true);
- if(component is Container) {
- var n:int = Container(component).numChildren;
- for(var i:int=0; i<n; i++) {
- var child:DisplayObject = component.getChildAt(i);
- if(child is UIComponent) {
- addUpdateListeners(UIComponent(child));
- }
- }
- }
- }
- override public function drawBitmap():void
- {
- bitmap.fillRect( bitmap.rect, this.fillColor );
- var mtx:Matrix = new Matrix();
- mtx.scale( movie.scaleX, movie.scaleY );
- bitmap.draw( movie, mtx, movie.transform.colorTransform );
- }
- private function handleUpdateComplete(event:Event):void {
- if(bitmap)
- updateBitmap();
- }
- }
- }