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

推荐订阅源

WordPress大学
WordPress大学
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
GRAHAM CLULEY
P
Privacy International News Feed
L
LINUX DO - 热门话题
C
Cisco Blogs
T
Tor Project blog
AWS News Blog
AWS News Blog
K
Kaspersky official blog
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
P
Proofpoint News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
Project Zero
Project Zero
Attack and Defense Labs
Attack and Defense Labs
Latest news
Latest news
The Last Watchdog
The Last Watchdog
Apple Machine Learning Research
Apple Machine Learning Research
Simon Willison's Weblog
Simon Willison's Weblog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cloudbric
Cloudbric
Last Week in AI
Last Week in AI
S
Security Affairs
Google DeepMind News
Google DeepMind News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
有赞技术团队
有赞技术团队
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
P
Palo Alto Networks Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
Security @ Cisco Blogs
V
V2EX
S
Secure Thoughts
人人都是产品经理
人人都是产品经理
月光博客
月光博客
博客园_首页
T
Troy Hunt's Blog
爱范儿
爱范儿
N
News and Events Feed by Topic
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy & Cybersecurity Law Blog
V
Vulnerabilities – Threatpost

博客园 - gzboy

一个flex例子(自定义download progress bar的) AS3的中文学习资料 终于可以让Flash基于C#完美操作数据库了,想开发全flash的,全部读取数据库的个人BLOG... 基于.NET + FMS + SQLSERVER2005 + Flash Remoting(技术)的FLASH播放器开发成功 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中大文件上传遇到的问题.
基于FMS的在线录制例子... - gzboy - 博客园
gzboy · 2007-01-20 · via 博客园 - gzboy

在FMS安装目录下的appliaction目录下建立test1文件夹...

然后打开flash 8插入以下代码...

  1 function Record()
  2 {
  3     video_r._visible = true;
  4     video_p._visible = false;
  5     play_bt.enabled = false;
  6     record_bt.label = "停止";
  7     rapStatus = "recording";
  8     videoinfo.text = "文件信息:" + videoName + ".flv";
  9     rap_status.text = "当前状态:正在录制";
 10     netStream.publish(videoName, "record");
 11     RecordInterval = setInterval(RecordTime, 1000);
 12 
 13 function RecordStop()
 14 {
 15     rap_status.text = "当前状态:录制完成";
 16     record_bt.label = "录制";
 17     play_bt.enabled = true;
 18     clearInterval(RecordInterval);
 19     timeNum = 0;
 20     netStream.close();
 21     rapStatus = "recordstop";
 22     videolist.addItem({label: videoName});
 23 
 24 function RecordTime()
 25 {
 26     ++timeNum;
 27     rap_status.text = "当前状态:录制中 - " + Math.floor(timeNum / 60+ "" + timeNum % 60 + "";
 28 
 29 function PlayVideo()
 30 {
 31     video_r._visible = false;
 32     video_p._visible = true;
 33     record_bt.enabled = false;
 34     play_bt.label = "停止";
 35     var playvideo = videolist.selectedItem.label;
 36     video_p.attachVideo(netStream);
 37     rapStatus = "playing";
 38     netStream.play(playvideo);
 39     netStream.onStatus = function (PlayInfo)
 40     {
 41         if (PlayInfo.code == "NetStream.Play.Stop")
 42         {
 43             rapStatus = "playstop";
 44             netStream.close();
 45             rap_status.text = "当前状态:播放完毕";
 46             play_bt.label = "播放";
 47             record_bt.enabled = true;
 48         } 
 49     };
 50 
 51 function PlayStop()
 52 {
 53     video_r._visible = true;
 54     video_p._visible = false;
 55     video_r.attachVideo(my_cam);
 56     record_bt.enabled = true;
 57     play_bt.label = "播放";
 58     rapStatus = "playstop";
 59     netStream.close();
 60     rap_status.text = "当前状态:播放停止";
 61 
 62 var ser_url = "rtmp://192.168.1.68/r_p";
 63 var rec_date = new Date();
 64 var videoName = String(rec_date.getFullYear()) + String(rec_date.getMonth() + 1+ String(rec_date.getDate()) + String(rec_date.getHours()) + String(rec_date.getMinutes()) + String(rec_date.getSeconds()) + String(rec_date.getMilliseconds());
 65 var netConn = new NetConnection();
 66 netConn.connect(ser_url);
 67 var netStream = new NetStream(netConn);
 68 var my_cam = Camera.get();
 69 if(my_cam == null)
 70 {
 71     rap_status.text = "当前状态:没有找到MAC";
 72 }
 73 else
 74 {
 75     video_r.attachVideo(my_cam);
 76     my_cam.setQuality(0100);
 77     my_cam.setKeyFrameInterval(15);
 78     my_cam.setLoopback(true);
 79     my_cam.setMode(32024030true);
 80     netStream.attachVideo(my_cam);
 81     my_cam.onStatus = function(infoObj:Object)
 82     {
 83         if (my_cam.muted) {
 84         // If user is denied access to their Camera, you can display an error message here. You can display the user's Camera/Privacy settings again using System.showSettings(0); 
 85         trace("User denied access to Camera");
 86         System.showSettings(0);
 87         }
 88     }
 89     var my_mic = Microphone.get();
 90     if(my_mic == null)
 91     {
 92         rap_status.text = "当前状态:没有找到MIC";
 93     }
 94     else
 95     {
 96         netStream.attachAudio(my_mic);
 97         my_mic.onStatus = function(infoObj:Object)
 98         {
 99             if (my_mic.muted) {
100             // If user is denied access to their Camera, you can display an error message here. You can display the user's Camera/Privacy settings again using System.showSettings(0); 
101             trace("User denied access to Camera");
102             System.showSettings(0);
103             }
104         }
105     }
106 }
107 var rapStatus = "free";
108 netConn.onStatus = function (info)
109 {
110     if (info.code == "NetConnection.Connect.Success")
111     {
112         conn_status.text = "连接状态: 连接成功";
113     }
114     else
115     {
116         conn_status.text = "连接状态: 连接错误";
117     }
118 };
119 var timeNum = 0;
120 record_bt.onRelease = function ()
121 {
122     if (rapStatus == "free" | rapStatus == "recordstop")
123     {
124         Record();
125     }
126     else if (rapStatus == "recording")
127     {
128         RecordStop();
129     } 
130 };
131 play_bt.onRelease = function ()
132 {
133     if (rapStatus == "free" | rapStatus == "playstop" | rapStatus == "recordstop")
134     {
135         //trace(videolist.length);
136         if(videolist.length > 0)
137         {
138             PlayVideo();
139         }
140         else
141         {
142             rap_status.text = "当前状态:没有视频";
143         }
144     }
145     else if (rapStatus == "playing")
146     {
147         PlayStop();
148     }
149 };

其中conn_status,rap_status,videoinfo为testarea...

play_bt,record_bt为按钮...

videolist为list...

video_r,video_p为视频元件(建立方法为:按ctrl+L,然后右击,新建视频,命名,拖到场景中,把实例改为前面的名称就可以了)...

剩下的...自己试吧...

参考例子的声明:

    Powerd By:Cincn.com
    Create By:KeeRula;
    此教程及附带源文件仅做网友个人交流学习使用.请勿用于商业用途.需要商业版请联系MSN:Myproductgroup@hotmail.com.
    FLASH技术交流学习群:25448796.
    版权保护:北联科技.

欢迎交流:msn:gd_gz_boy@hotmail.com