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

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google DeepMind News
Google DeepMind News
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
V2EX - 技术
V2EX - 技术
Webroot Blog
Webroot Blog
Google Online Security Blog
Google Online Security Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
AI
AI
N
News and Events Feed by Topic
S
Secure Thoughts
www.infosecurity-magazine.com
www.infosecurity-magazine.com
The Cloudflare Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tailwind CSS Blog
Vercel News
Vercel News
V
Vulnerabilities – Threatpost
Spread Privacy
Spread Privacy
Know Your Adversary
Know Your Adversary
人人都是产品经理
人人都是产品经理
I
Intezer
Schneier on Security
Schneier on Security
Martin Fowler
Martin Fowler
J
Java Code Geeks
K
Kaspersky official blog
H
Heimdal Security Blog
O
OpenAI News
I
InfoQ
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
云风的 BLOG
云风的 BLOG
Hacker News - Newest:
Hacker News - Newest: "LLM"
Blog — PlanetScale
Blog — PlanetScale
S
Schneier on Security
S
Security @ Cisco Blogs
Security Latest
Security Latest
PCI Perspectives
PCI Perspectives
H
Hacker News: Front Page
C
CERT Recently Published Vulnerability Notes
博客园_首页
The Last Watchdog
The Last Watchdog
罗磊的独立博客
L
LINUX DO - 热门话题
U
Unit 42
月光博客
月光博客
Security Archives - TechRepublic
Security Archives - TechRepublic
Scott Helme
Scott Helme

博客园 - 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