650) This. length = 650; "src =" http://s3.51cto.com/wyfs02/M02/49/F3/wKiom1Qf3U2RW9iBAAKGuq33DNA921.jpg "Title =" 6.png" width = "730" Height = "500" border = "0" hspace = "0" vspace = "0" style = "width: 730px; Height: 500px; "alt =" wkiom14253u2rw9ibaakguq33dna 921.jpg "/>
I am using the Flex + ActiveX Control (maybe there is a better way :)).
1. Use ActiveX controls in flex
Using ActiveX controls in flex:
1. embed a webpage in flex.
2. layout the webpage to the appropriate location on the flex interface.
3. Embed ActiveX controls into webpages.
4. Solve the Problem of mutual access between ActiveX controls and flex.
Fortunately, there were a lot of articles on how to embed web pages in flex, which introduced the use of IFRAME controls (http://code.google.com/p/flex-iframe/) and the use of IFRAME controls in flex, as shown below:
<ns1:IFrame id="iframe_TvWall" source="/TVWall.htm" ></ns1:IFrame>
Tvwall.htm is a Web page embedded in ActiveX.
2. embedded ActiveX controls in webpages
<OBJECT ID="TVWallAX1" WIDTH="100%" HEIGHT="100%" CLASSID="CLSID:1DD61B8D-F1E6-43B9-82CB-3AD4C290E40F"> <PARAM NAME="_Version" VALUE="65536"> <PARAM NAME="_ExtentX" VALUE="2646"> <PARAM NAME="_ExtentY" VALUE="1323"> <PARAM NAME="_StockProps" VALUE="0"></OBJECT>
3. Flex calls ActiveX Functions
You need to write the following JS script on the webpage:
<SCRIPT LANGUAGE="JavaScript"> function doCmd(param) { return TVWallAX1.SendCmd(param); }</SCRIPT>
Sendcmd is a function defined in the ActiveX control. The parameter is a string.
FLEX can access ActiveX functions through the following program code (Flex accesses ActiveX through JS)
iframe_TvWall.callIFrameFunction("doCmd",array);
4. ActiveX controls access flex Functions
You need to write the following JS script on the webpage:
<SCRIPT LANGUAGE="JavaScript" FOR="TVWallAX1" EVENT="Notify(param)"><!--window.parent.document.getElementById("Client").getFlexMsg(param);-->
Client is the ID of SwF in the HTML file.
Notify is a notification function defined in ActiveX controls. The parameter is a string.
The code to be called in the flex code is as follows:
ExternalInterface.addCallback("getFlexMsg",getMsgFromFlex); private function getMsgFromFlex(param):void { Alert.show("ok"); }
This article from the "sensitive" blog, please be sure to keep this source http://9249657.blog.51cto.com/9239657/1557007
Flex Video Monitoring Real-time stream playback