MXML is an XML-based user interface markup language first introduced by Macromedia in March 2004. Adobe Systems (which acquired Macromedia in December 2005) gives no official meaning for the acronym, but some developers suggest it should stand for "Magic eXtensible Markup Language" (which is a backronym).
MXML其实就类似于xhtml,xml用于定义控件及其属性,actionscript用来定义一些复杂的操作,类似的MXML也是事件驱动的,由event触发actionscript。
但是MXML比起xhtml的优势又在于哪里呢?
跨浏览器,更丰富的图形操作媒体播放能力。
关于ShareObject的开发,关键是先创建NetConnection,在其连接成功后用其创建一个share object(SharedObject.getRemote)。监听share object的SyncEvent.SYNC事件可以获取更新,修改share object可以对其进行更新。
对于如何录制视频,关键在于使用NetStream,将NetConnection,Camera和Microphone设置到NetStream上,然后调用他的publish()方法。
播放使用VideoDisplay控件,设置它的source属性然后调用它的play()方法,或者创建一个NetStream连接到媒体流上,然后调用video display的attachNetStream()和net stream的play()方法。
播放自己摄像头的图像使用VideoDisplay的attachCamera方法。
Application类有几个重要事件如下:
Application.onAppStart 当这个应用程序被服务器装载时调用。
Application.onAppStop 当这个应用程序被服务器卸载时调用。
Application.onConnect 当一个客户机连接到这个应用程序时调用。
Application.onDisconnect 当一个客户机从这个应用程序断开连接时调用。
Application类有几个重要方法如下:
Application.acceptConnection() 接受一个来自客户机的至一个应用程序的连接。
Application.broadcastMsg() 向所有连接的客户机广播一条消息。
Application.disconnect() 从服务器断开一个客户机的连接。
Application.rejectConnection() 拒绝至一个应用程序的连接。
NetConnection用于客户端(主动发起连接的一方,所以也可能是服务器连接另一台服务器)
NetConnection.client上的方法可以被连接的另一方调用(所以flash上经常有netConnection.client = this的方法)
NetConnection.call()用于调用对方的方法。
Client用于服务器端(被动连接的一方)
Client上的方法可以被连接的另一方调用。
Client.call用于调用对方的方法。
做视频聊天是需要综合利用上面提到各个类,除此之外还需要维护一个参加聊天的用户列表,在用户加入/离开时更新所有客户端。
Red5的ApplicationAdapter默认已经实现了各种功能,比如媒体录制、播放、共享对象等等,所以只有真的有需要才重载它的方法。
ApplicationAdapter的子类上所有的(public?)方法都可以被客户端call,要call客户端的方法就要把IConnection转成IServiceCapableConnection。
分享到:
相关推荐
这是Ulrich Drepper的经典文章的英文原版,Ulrich Drepper是著名的德国工程师,是Glibc的第一代大当家(由于独断专行现在已经被褫夺了全力)。此文图文并茂的介绍了 RAM/DRAM的硬件原理、CPU的多级缓存机制、DMA原理...
尽管现代Web技术如HTML5和JavaScript框架的崛起对Flex带来一定冲击,但在某些特定需求下,Flex和MXML仍保持着独特的价值。 总之,MXML作为Flex开发中的重要组成部分,以其直观易用和强大的功能,极大地简化了富...
描述中提到"this pdf talk about flex and compiler"进一步确认了这个PDF文件会讨论Flex编程语言以及与其相关的编译器。 Flex是一种用于构建富互联网应用程序(Rich Internet Applications,RIAs)的开放源代码框架...
Here you find all the data sets described and analysed in the textbook: "Complex Networks: Principles, Methods and Applications", V. Latora, V. Nicosia, G. Russo (Cambridge University Press, 2017) ...
Now, even programmers who know close to nothing about this technology can use simple, efficient tools to implement programs capable of learning from data. This practical book shows you how. By using...
This library allows to generate beautiful About Pages with less effort, it's fully customizable and supports opening specific intent View aboutPage = new AboutPage(this) .isRTL(false) .setImage(R....
Create visually appealing and feature-rich applications by using Qt 5 and the C++ language Qt 5, the latest version of Qt, enables you to develop applications with complex user interfaces for multiple...
A modern About Box for an Android App built on the daniel-stoneuk/material-about-library. Easily display the common items of an About Box in a modern Android friendly way About Android About Box is ...
He strongly believes that Flash Developers and Designers should be as comfortable with and passionate about code as they are about aesthetics and design. \"Flash allows you to bring everything ...
Developing-Android-Apps-course ...Lesson 1 - Creating Project Sunshine - Learn how to create and run a simple ...- Learn about threading and how to make requests without slowing down your app - Learn how t
5. **项目结构(压缩包子文件的文件名称列表)**:提供的文件名"IF-customer-from-A-no.-and-query-about-B-then-tagging-will-done-on-A-and-B-no.-will-be-captu-master"可能是代码库或项目主分支的名称,暗示了这...
Everything about Transfer Learning and Domain Adaptation--迁移学习
In this chapter, we think about stack and heap memory. Chapter 4, Lists, Lists, and More Lists, covers the first data structures: lists. Using several examples, this chapter goes into variations of ...
Then, before we set out to explore the Machine Learning continent, we will take a look at the map and learn about the main regions and the most notable landmarks: supervised versus unsupervised ...
Pete Loshin writes and consults about Internet protocols and open source network technologies. Formerly on staff at BYTE Magazine, Information Security Magazine and other publications, his work ...
Chapter 5, Deployment Mode - Learn about the new and user friendly deployment model and several ways of deploying a service in Axis2. Chapter 6, Information Model - Learn how Axis2 stores it static ...
### Fedora Linux Toolbox: 1000+ Commands for Fedora, CentOS, and Red Hat Power Users #### Chapter 1: Starting with Fedora Linux In this chapter, readers are introduced to Fedora Linux, an advanced ...
Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems by Aurélien Géron English | 2017 | ISBN: 1491962291 | 566 Pages | EPUB | 8.41...