惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
C
Cybersecurity and Infrastructure Security Agency CISA
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
T
Threat Research - Cisco Blogs
C
Cisco Blogs
Recent Announcements
Recent Announcements
S
Securelist
N
Netflix TechBlog - Medium
The Register - Security
The Register - Security
P
Privacy & Cybersecurity Law Blog
宝玉的分享
宝玉的分享
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
LINUX DO - 热门话题
T
Tor Project blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
月光博客
月光博客
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
博客园 - 司徒正美
L
LINUX DO - 最新话题
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
H
Help Net Security
Spread Privacy
Spread Privacy
PCI Perspectives
PCI Perspectives
Project Zero
Project Zero
I
Intezer
T
The Blog of Author Tim Ferriss
有赞技术团队
有赞技术团队
The Last Watchdog
The Last Watchdog
C
Check Point Blog
Blog — PlanetScale
Blog — PlanetScale
B
Blog RSS Feed
MyScale Blog
MyScale Blog
V
Vulnerabilities – Threatpost
Recorded Future
Recorded Future
T
Tenable Blog
Jina AI
Jina AI
D
DataBreaches.Net
阮一峰的网络日志
阮一峰的网络日志

博客园 - gzboy

AS3的中文学习资料 终于可以让Flash基于C#完美操作数据库了,想开发全flash的,全部读取数据库的个人BLOG... 基于.NET + FMS + SQLSERVER2005 + Flash Remoting(技术)的FLASH播放器开发成功 基于FMS的在线录制例子... - gzboy - 博客园 loadrunner8.0 获取数据库名称与数据库中表名的方法 问个关于SQL 2005同步的问题 Flex2下载地址及注册码 让IIS 6.0支持FLV的方法 残念,我决定放弃Flash Remoting!!! 在Flash中接收来自页面(.NET)的值的方法. 大概看了一下《Flash MX 2004 -- 数据库应用开发 - 基于.NET架构》,感觉有点迷惘了! 在flash remoting for .net中,AS代码是怎样调用aspx中的具体方法呢? 通过Flash Remoting,怎么通过页面主动传递值给Flash player呢? 调试Flash Remoting中出现的问题. 又出现一个技术难关:Flash remoting的应用 大文件上传组件终于调试成功了... 还是大文件上传的问题,超级郁闷,有相关经验的进来说说... .NET中大文件上传遇到的问题.
一个flex例子(自定义download progress bar的)
gzboy · 2007-03-08 · via 博客园 - gzboy

地址http://www.onflex.org/flexapps/components/CustomPreloader/

代码

package preload
{
    import flash.display.Loader;
    import flash.utils.ByteArray;
    import flash.events.MouseEvent;
    import flash.events.TimerEvent;
    import flash.utils.Timer;
    
    
public class WelcomeScreen extends Loader//继承其他类吧???
    {
        
        [ Embed(source
="welcome.gif", mimeType="application/octet-stream") ]//要求这个progress bar加载前,先把welcome.gif下载好,以便代码之用
        public var WelcomeGif:Class;//建立一个空类
        public var timer:Timer;//建立一个定时器
        private var fadeInRate:Number  = .01;//设定透明度每次增加的量
        private var fadeOutRate:Number = .02;//设定透明度每次减少的量
        private var timeAutoClose:int = 500;
        
public var ready:Boolean = false
        
        
public function WelcomeScreen()//本类的构造函数,在实例化的时候首先执行
        {
            
this.visible = false;//不显示
            this.alpha = 0;//完全透明
            timer = new Timer( 1 );//建立定时器,时间间隔为1毫秒??
            timer.addEventListener( TimerEvent.TIMER, updateView );//建立一个显示的过程
            timer.start();this.loadBytes( new WelcomeGif() as ByteArray );//把图片load进实例化为ByteArray的WelcomeGif类里面,详细看loadBytes的用法(这句应该是属于显示图片的关键语句吧)
            this.addEventListener( MouseEvent.MOUSE_DOWN, mouseDown );//建立鼠标帧听时间(实现点击鼠标就关闭???)             
        }
        
        
public function updateView( event:TimerEvent ):void//图片从全透明变成不透明的方法
        {
            
ifthis.alpha < 1)    this.alpha = this.alpha + this.fadeInRate;
            
this.stage.addChild(this)
            
this.x = this.stage.stageWidth/2 - this.width/2
            
this.y = this.stage.stageHeight/2 - this.height/2
            
this.visible=true;
            
ifthis.ready && timer.currentCount > this.timeAutoClose ) closeScreen()    //如果ready为true??与定时器的值大于上面设置的500,就关闭图片
        }
        
        
public function closeScreen():void//关闭图片的方法,去掉2个帧听,加入一个新的帧听,让图片渐渐消失
        {
            timer.removeEventListener( TimerEvent.TIMER, updateView );
            timer.removeEventListener( MouseEvent.MOUSE_DOWN, mouseDown);
            timer.addEventListener( TimerEvent.TIMER, closeScreenFade );                    
        }
        
        
public function closeScreenFade( event:TimerEvent ):void//图片渐渐消失的过程,透明度不断变小,当透明度不大于0(就是为0时),timer停止,图片被去掉
        {
            
ifthis.alpha > 0){
                
this.alpha = this.alpha - fadeOutRate;
            } 
else {
                timer.stop()
                
this.parent.removeChild(this);
            }        
        }        
        
        
public function mouseDown( event:MouseEvent ):void//这里简单,老鼠一点,就关闭了
        {
            closeScreen();        
        }
                
    }
}

注释的不一定准确,发现错误,欢迎指正...
这是主要的类,其他的比较简单,详细可以打开连接后,右击,点ViewSource...

欢迎有共同兴趣的一起研究,请联系:QQ165619258,MSN:gd_gz_boy@hotmail.com