Search Results

Search found 32 results on 2 pages for 'netconnection'.

Page 1/2 | 1 2  | Next Page >

  • Flex NetConnection error: Property onDirtyList not found on flash.net.NetConnection

    - by David Wolever
    I'm having some trouble with NetConnection. The following code makes a connection without issue… var n:NetConnection = new NetConnection(); n.objectEncoding = ObjectEncoding.AMF0; n.addEventListener(NetStatusEvent.NET_STATUS, function(...args):void { trace("HERE"); }); n.connect("rtmp://...host...", ...args); But as soon as the NET_STATUS event handler finishes (ie, hitting "step into" with the debugger), I get this error: ReferenceError: Error #1069: Property onDirtyList not found on flash.net.NetConnection and there is no default value. Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback onDirtyList. error=ReferenceError: Error #1069: Property onDirtyList not found on flash.net.NetConnection and there is no default value. at Test/___Test_Application1_creationComplete()[/Users/wolever/Workspace/Test/src/Test.mxml:13] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9440] at mx.core::UIComponent/set initialized()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1168] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8744] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8684] Which is kind of scary because onDirtyList only yields two hits on Google. So... Any suggestions?

    Read the article

  • Error #2126: NetConnection object must be connected

    - by Shuo
    Hey guys , I want to count the online user,when each client login the system,it's connecting to the server and increase a variable stored in a remote shared object. But when client connecting server,problems arises:Error #2126: NetConnection object must be connected My web layout: Website --- apps --- userLogin Code snippets: rtmpnc = new NetConnection(); rtmpnc.objectEncoding = ObjectEncoding.AMF0; var uri:String = ServerConfig.getChannel("my-rtmp").endpoint + "/userLogin"; rtmpnc.connect("http://202.206.249.193:2367/userLogin"); rtmpnc.addEventListener(NetStatusEvent.NET_STATUS,onNetStatusHandler); The onNetStatusHander is defined as : switch(event.info.code) { case "NetConnection.Connect.Success":onConnSuccess();break; case "NetConnection.Connect.Failed":onConnError();break; } Could anyoue help me out?Much thanks! Best,Shuo

    Read the article

  • FMS NetConnection.Connect.Close happening when starts and even in the middle of video in Flash with

    - by Sunil Kumar
    Hi I have developed a Flash Video player in Flash CS3 with Action Script 2.0 to play video from Adobe Flash Media Server 3.5. To play video from FMS 3.5, first I have to verify my swf file on FMS 3.5 server console so that it can be ensure that RTMP video URL only be play in verified SWF file. Right now I am facing problem of "NetConnection.Connect.Close" when I try to connect my NetConnection Object to FMS 3.5 to stream video from that server. So now I am getting this message "NetConnection.Connect.Close" from FMS 3.5. When this is happening in my office area at the same time when I am checking the the same video url from out side the office (With help of my friends who is in another office) area it is working fine. My friends naver faced even a single issue with NetConnection.Connect.Close. But in my office when I got message NetConnection.Connect.Close, I can play another streaming video very well like mtv.com jaman.com rajshri.com etc. Some time FMS works fine and video starts playing but in the middle of the video same thing happen "NetConnection.Connect.Close" There is no issue of Bandwidth in my office. I do't know why this is happening. Please see the message when I am getting "NetConnection.Connect.Close" message. NetConn == data: NetConn == objectEncoding: 0 NetConn == description: Connection succeeded. NetConn == code: NetConnection.Connect.Success NetConn == level: status NetConn == level: status NetConn == code: NetConnection.Connect.Closed Please help Thanks & regards Sunil Kumar

    Read the article

  • pass ...rest to a NetConnection call

    - by dome
    I want to pass a rest in a netconnection call, something like this: public function requestData(service : String, ...params) : void { nc.call(service, params); } this doesn't work since the call is expecting each parameter to be separated by commas, like: nc.call(service, params[0], params[1], params[2]); I've read some posts about apply, but I can't find a solution for this specific case.

    Read the article

  • NetStatusHandler never gets called (Flash CS5)

    - by Loto
    Hi, I'm using this code to connect Flash CS5 to WebORB: import flash.display.*; import fl.events.*; import flash.events.NetStatusEvent; import flash.net.*; import flash.utils.*; import fl.transitions.*; // var connection:NetConnection; // function initORB(){ var gateway:String = "http://www.domain.com/weborb30/console/weborb.aspx"; connection=new NetConnection(); connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); connection.connect(gateway); } // function netStatusHandler(e:NetStatusEvent) { trace("status entered"); } initORB(); The strange thing is that: the netStatusHandler function NEVER gets called; but I can call any orb exposed method (that's not possible if Flash and WebORB are not connected); The fact is that I want to know if the client is connected too. Regards, Loto

    Read the article

  • How to implement a web app with blazeds+java+flex+tomcat?

    - by ARYAD
    Hi, i'm doing a web app in flex blazeds and java, i installed the eclipse plugs for using WTP mixed project, i use the flex's server that uses an emulate of tomcat when i ran my flex service the web app got the datas, everythings is ok. the problem is when i copy the proyect with all files generated by flex in my tomcat or the blazeds's tomcat, it doesn't work, this is becasue i want to implement my app on a server the error is: "(mx.messaging.messages::ErrorMessage)#0 body = (Object)#1 clientId = (null) correlationId = "B425A2A7-7D12-A982-7779-8CCBF669413C" destination = "" extendedData = (null) faultCode = "Client.Error.MessageSend" faultDetail = "Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf'" faultString = "Send failed" headers = (Object)#2 messageId = "1CBC6020-0ED8-C4CC-3B77-8CCBF6D6621D" rootCause = (mx.messaging.events::ChannelFaultEvent)#3 bubbles = false cancelable = false channel = (mx.messaging.channels::AMFChannel)#4 authenticated = false channelSets = (Array)#5 [0] (mx.messaging::ChannelSet)#6 authenticated = false channelIds = (Array)#7 [0] "my-amf" channels = (Array)#8 [0] (mx.messaging.channels::AMFChannel)#4 clustered = false connected = false currentChannel = (mx.messaging.channels::AMFChannel)#4 initialDestinationId = (null) messageAgents = (Array)#9 [0] (mx.rpc::AsyncRequest)#10 authenticated = false autoConnect = true channelSet = (mx.messaging::ChannelSet)#6 clientId = (null) connected = false defaultHeaders = (null) destination = "ADEscenario" id = "7D92EDF2-CF62-9545-BA11-8CCBF6691E6B" reconnectAttempts = 0 reconnectInterval = 0 requestTimeout = -1 subtopic = "" connected = false connectTimeout = -1 enableSmallMessages = true endpoint = "http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf" failoverURIs = (Array)#11 id = "my-amf" mpiEnabled = false netConnection = (flash.net::NetConnection)#12 client = (mx.messaging.channels::AMFChannel)#4 connected = false objectEncoding = 3 proxyType = "none" uri = "http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf" piggybackingEnabled = false polling = false pollingEnabled = true pollingInterval = 3000 protocol = "http" reconnecting = false recordMessageSizes = false recordMessageTimes = false requestTimeout = -1 uri = "http://{server.name}:{server.port}/IEC-BLAZEDS/messagebroker/amf" url = "http://{server.name}:{server.port}/IEC-BLAZEDS/messagebroker/amf" useSmallMessages = false channelId = "my-amf" connected = false currentTarget = (mx.messaging.channels::AMFChannel)#4 eventPhase = 2 faultCode = "Channel.Connect.Failed" faultDetail = "NetConnection.Call.Failed: HTTP: Failed: url: 'http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf'" faultString = "error" reconnecting = false rejected = false rootCause = (Object)#13 code = "NetConnection.Call.Failed" description = "HTTP: Failed" details = "http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf" level = "error" target = (mx.messaging.channels::AMFChannel)#4 type = "channelFault" timestamp = 0 timeToLive = 0" i don't know why tomcat doesn't find the class of flex.messaging.endpoints.AMFEndpoint that is used for my-amf 'http://172.16.8.245:8400/IEC-BLAZEDS/messagebroker/amf'. all works well in the emulated server that flex has.

    Read the article

  • event listener says NetStream.Play.Start but I see no video

    - by Curtis
    I'm trying to test out the Adobe Media Server, and I'm following some tutorials in order to stream a video. I have a NetConnection which successfully connects to the application on the server, then I have the code below. It looks like it's supposed to play a video, but it doesn't. It creates the video object as a black square in the top left corner, and the event.info.code says NetStream.Play.Start, but I don't see the video playing. case "NetConnection.Connect.Success": var v:Video = new Video(); v.width=200; v.height=200; v.x=0; v.y=0; v.visible=true; v.opaqueBackground=false; stage.addChild(v); var ns:NetStream = new NetStream(nc); ns.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler); v.attachNetStream(ns); ns.play("mp4:polymorphics.f4v"); I can also try ns.play("rtmp://localhost/vod/mp4:tests/polymorphics.f4v"); but that gives me a Stream Not Found error The lines that begin with "ns" means that they're generated by my NetStream listener, as opposed to my NetConnection listener. Connecting... connected is: true event.info.level: status event.info.code: NetConnection.Connect.Success onReply recieved value: Hello, World! ns connected is: true ns event.info.level: status ns event.info.code: NetStream.Play.Reset ns connected is: true ns event.info.level: status ns event.info.code: NetStream.Play.Start

    Read the article

  • spring JDBC

    - by Adhir
    I am getting the following exception whe using derby to do a UPDATE in oracle Database org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.derby.client.am.DisconnectException: A communication error has been detected. Communication protocol being used: Reply.fill(). Communication API being used: InputStream.read(). Location where the error was detected: insufficient data. Communication function detecting the error: *. Protocol specific error codes(s) TCP/IP SOCKETS at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:522) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:737) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:795) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:803) at com.poc.data.dao.UserDerbyDao.create(UserDerbyDao.java:19) at com.poc.register.RegisterUtil.registerUser(RegisterUtil.java:34) at com.poc.service.MyService.doRegister(MyService.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:175) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:166) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:114) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:74) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:114) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:66) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:658) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:616) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:607) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:309) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:425) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:590) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.derby.client.am.DisconnectException: A communication error has been detected. Communication protocol being used: Reply.fill(). Communication API being used: InputStream.read(). Location where the error was detected: insufficient data. Communication function detecting the error: *. Protocol specific error codes(s) TCP/IP SOCKETS at org.apache.derby.client.net.NetAgent.throwCommunicationsFailure(Unknown Source) at org.apache.derby.client.net.Reply.fill(Unknown Source) at org.apache.derby.client.net.Reply.ensureALayerDataInBuffer(Unknown Source) at org.apache.derby.client.net.Reply.readDssHeader(Unknown Source) at org.apache.derby.client.net.Reply.startSameIdChainParse(Unknown Source) at org.apache.derby.client.net.NetConnectionReply.readExchangeServerAttributes(Unknown Source) at org.apache.derby.client.net.NetConnection.readServerAttributesAndKeyExchange(Unknown Source) at org.apache.derby.client.net.NetConnection.flowServerAttributesAndKeyExchange(Unknown Source) at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(Unknown Source) at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source) at org.apache.derby.client.net.NetConnection.(Unknown Source) at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:291) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:277) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:259) at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:240) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79) ... 37 more Any help Thanks in advance Adhir

    Read the article

  • Simple Remote Shared Object with Red5 Flash Server

    - by John Russell
    Hello, I am trying to create a simple chat client using the red5 media server, but I seem to be having a slight hiccup. I am creating a shared object on the server side, and it seems to be creating it successfully. However, when I make changes to the object via the client (type a message), the SYNC event fires, but the content within the shared object remains empty. I suspect I am doing something wrong on the java end, any advice? Console Results: Success! Server Message: clear Server Message: [object Object] Local message: asdf Server Message: change Server Message: [object Object] Local message: fdsa Server Message: change Server Message: [object Object] Local message: fewa Server Message: change Server Message: [object Object] Server Side: package org.red5.core; import java.util.List; import org.red5.server.adapter.ApplicationAdapter; import org.red5.server.api.IConnection; import org.red5.server.api.IScope; import org.red5.server.api.service.ServiceUtils; import org.red5.server.api.so.ISharedObject; // import org.apache.commons.logging.Log; // import org.apache.commons.logging.LogFactory; public class Application extends ApplicationAdapter { private IScope appScope; // private static final Log log = LogFactory.getLog( Application.class ); /** {@inheritDoc} */ @Override public boolean connect(IConnection conn, IScope scope, Object[] params) { appScope = scope; createSharedObject(appScope, "generalChat", false); // Creates general chat shared object return true; } /** {@inheritDoc} */ @Override public void disconnect(IConnection conn, IScope scope) { super.disconnect(conn, scope); } public void updateChat(Object[] params) { ISharedObject so = getSharedObject(appScope, "generalChat"); // Declares and stores general chat data in general chat shared object so.setAttribute("point", params[0].toString()); } } Client Side: package { import flash.display.MovieClip; import flash.events.*; import flash.net.*; // This class is going to handle all data to and from from media server public class SOConnect extends MovieClip { // Variables var nc:NetConnection = null; var so:SharedObject; public function SOConnect():void { } public function connect():void { // Create a NetConnection and connect to red5 nc = new NetConnection(); nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); nc.connect("rtmp://localhost/testChat"); // Create a StoredObject for general chat so = SharedObject.getRemote("generalChat", nc.uri, false); so.connect(nc); so.addEventListener(SyncEvent.SYNC, receiveChat) } public function sendChat(msg:String) { trace ("Local message: " + msg); nc.call("updateChat", null, msg) } public function receiveChat(e:SyncEvent):void { for (var i in e.changeList) { trace ("Server Message: " + e.changeList[i].code) trace ("Server Message: " + e.changeList[i]) } } // Given result, determine successful connection private function netStatusHandler(e:NetStatusEvent):void { if (e.info.code == "NetConnection.Connect.Success") { trace("Success!"); } else { trace("Failure!\n"); trace(e.info.code); } } } }

    Read the article

  • Detect TCP connection close when playing Flash video

    - by JoJo
    On the Flash client side, how do I detect when the server purposely closes the TCP connection to its video stream? I'll need to take action when this occurs - maybe attempt to restart the video or display an error message. Currently, the connection closing and the connection being slow look the same to me. The NetStream object ushers a NetStream.Play.Stop event in both cases. When the connection is slow, it usually recovers by itself within seconds. I wish to only take action when the connection is closed, not when it is slow. Here's how my general setup looks like. It's the basic NetConnection-NetStream-Video setup. this.vidConnection = new NetConnection(); this.vidConnection.addEventListener(AsyncErrorEvent.ASYNC_ERROR, this.connectionAsyncError); this.vidConnection.addEventListener(IOErrorEvent.IO_ERROR, this.connectionIoError); this.vidConnection.addEventListener(NetStatusEvent.NET_STATUS, this.connectionNetStatus); this.vidConnection.connect(null); this.vidStream = new NetStream(this.vidConnection); this.vidStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, this.streamAsyncError); this.vidStream.addEventListener(IOErrorEvent.IO_ERROR, this.streamIoError); this.vidStream.addEventListener(NetStatusEvent.NET_STATUS, this.streamNetStatus); this.vid.attachNetStream(this.vidStream); None of the error events fire when the server closes the TCP or when the connection freezes up. Only the NetStream.Play.Stop event fires. Here's a trace of what happens from initially playing the video to the TCP connection closing. connection net status = NetConnection.Connect.Success playStream(http://192.168.0.44/flv/4d29104a9aefa) NetStream.Play.Start NetStream.Buffer.Flush NetStream.Buffer.Full NetStream.Buffer.Empty checkDimensions 0 0 onMetaData NetStream.Buffer.Full NetStream.Buffer.Flush checkDimensions 960 544 NetStream.Buffer.Empty NetStream.Buffer.Flush NetStream.Play.Stop

    Read the article

  • How do I record video to a local disk in AIR?

    - by Jim OHalloran
    I'm trying to record a webcam's video and audio to a FLV file stored on the users local hard disk. I have a version of this code working which uses NetConnection and NetStream to stream the video over a network to a FMS (Red5) server, but I'd like to be able to store the video locally for low bandwidth/flaky network situations. I'm using FLex 3.2 and AIR 1.5, so I don't believe there should be any sandbox restrictions which prevent this from occurring. Things I've seen: FileStream - Allows reading.writing local files but no .attachCamera and .attachAudio methids for creating a FLV. flvrecorder - Produces screen grabs from the web cam and creates it's own flv file. Doesn't support Audio. License prohibits commercial use. SimpleFLVWriter.as - Similar to flvrecorder without the wierd license. Doesn't support audio. This stackoverflow post - Which demonstrates the playback of a video from local disk using a NetConnection/NetStream. Given that I have a version already which uses NetStream to stream to the server I thought the last was most promising and went ahead and put together this demo application. The code compiles and runs without errors, but I don't have a FLV file on disk which the stop button is clicked. - <mx:Script> <![CDATA[ private var _diskStream:NetStream; private var _diskConn:NetConnection; private var _camera:Camera; private var _mic:Microphone; public function cmdStart_Click():void { _camera = Camera.getCamera(); _camera.setQuality(144000, 85); _camera.setMode(320, 240, 15); _camera.setKeyFrameInterval(60); _mic = Microphone.getMicrophone(); videoDisplay.attachCamera(_camera); _diskConn = new NetConnection(); _diskConn.connect(null); _diskStream = new NetStream(_diskConn); _diskStream.client = this; _diskStream.attachCamera(_camera); _diskStream.attachAudio(_mic); _diskStream.publish("file://c:/test.flv", "record"); } public function cmdStop_Click() { _diskStream.close(); videoDisplay.close(); } ]]> </mx:Script> <mx:VideoDisplay x="10" y="10" width="320" height="240" id="videoDisplay" /> <mx:Button x="10" y="258" label="Start" click="cmdStart_Click()" id="cmdStart"/> <mx:Button x="73" y="258" label="Stop" id="cmdStop" click="cmdStop_Click()"/> </mx:WindowedApplication> It seems to me that there's either something wrong with the above code which is preventing it from working, or NetStream just can't be abused in this wany to record video. What I'd like to know is, a) What (if anything) is wrong with the code above? b) If NetStream doesn't support recording to disk, are there any other alternatives which capture Audio AND Video to a file on the users local hard disk? Thanks in advance!

    Read the article

  • Masking FLV video in AS3 with PNG alpha channel.

    - by James Roberts
    Hey there, I'm trying to mask an FLV with a PNG alpha channel. I'm using BitmapData (from a PNG) but it's not working. Is there anything I'm missing? Cut up code below: var musclesLoader:Loader = new Loader(); var musclesContainer:Sprite = new Sprite(); var musclesImage:Bitmap = new Bitmap(); var musclesBitmapData:BitmapData; var musclesVideo:Video = new Video(752, 451.2); var connection:NetConnection = new NetConnection(); var stream:NetStream; function loadMuscles():void { musclesLoader.load(new URLRequest('img/muscles.png')); musclesLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, musclesComplete); } function musclesComplete():void { musclesBitmapData = new BitmapData(musclesLoader.content.width, musclesLoader.content.height, true, 0x000000); musclesImage.bitmapData = musclesBitmapData; musclesImage.smoothing = true; musclesContainer.addChild(musclesImage); contentContainer.addChild(musclesContainer); } function loadMusclesVideo():void { connection.connect(null); stream = new NetStream(connection); stream.client = this; musclesVideo.mask = musclesBitmapData; stage.addChild(musclesVideo); musclesVideo.attachNetStream(stream); stream.bufferTime = 1; stream.receiveAudio(true); stream.receiveVideo(true); stream.play("vid/muscles.flv"); } Outside this code I have a function that adds the containers to the stage, etc and places the objects in the appropriate spots. It sort of works - the mask applies, but in a square (the size of the boundaries of musclesBitmapData) rather than with the shape of the alpha channel. Is this the right way to go about this?

    Read the article

  • Trouble adding video controls to video selected by XML comboBox

    - by user560128
    Hello, it's been a few years since I've touched flash, so perhaps I'm just overlooking something. If anyone could look at the code and offer any suggestions that would be awesome. What's working, I select a video from a combobox that is populated from an XML file, pick the video and it plays. I've been trying to add pause/play, stop, forward and reverse functionality, once I get that to work I also want to add a video scrubber(slider), and previous/next buttons to go to the previous/next video as listed in the xml file. At the moment I have a component button on the stage called playButton, which I'm trying to use for pause/play functionality. Below is my code, the player control is at the very bottom. Thanks. import fl.data.DataProvider; var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); var videosXML:XML = new XML(); var loader:URLLoader = new URLLoader(); var request:URLRequest= new URLRequest("xml/videos.xml"); var videos:Array = new Array({label:"Select a Video",data:""}); var client:Object = new Object(); theVideo.attachNetStream(ns); ns.client = client; loader.addEventListener(Event.COMPLETE,loaderOnComplete); loader.load (request); function loaderOnComplete(event:Event):void{ videosXML = new XML(event.target.data); for each (var video:XML in videosXML.video){ videos.push({label:video.name.toString(),data:video.url.toString()}); } moviesCB.dataProvider = new DataProvider(videos); } moviesCB.addEventListener(Event.CHANGE, changeHandler); function changeHandler(event:Event):void { if(ComboBox(event.target).selectedItem.data != ""){ ns.play(ComboBox(event.target).selectedItem.data); } }; client.onMetaData = metadataHandler; function metadataHandler(md:Object):void{ } //player controls playButton.onRelease = function() { ns.pause(); }

    Read the article

  • Playing FLV unexpectedly stops, but why?

    - by Josamoto
    I am trying to play an FLV video that is about 90Mb big, using the following snippet: private function playVideo(url:String):void { var customClient:Object = new Object(); customClient.onMetaData = metaDataHandler; var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); ns.client = customClient; ns.play(url); var myVideo:Video = new Video(); myVideo.attachNetStream(ns); addChild(myVideo); function metaDataHandler(infoObject:Object):void { myVideo.width = 640; myVideo.x = stage.stageWidth / 2 - 640 / 2; myVideo.height = 400; myVideo.y = 230; } } The video is not going to be streamed across the internet, in fact, the application will run locally and videos will also be loaded locally from disc. When starting my application, the video starts, but at random locations, playback completely freezes up, without any errors being thrown at all. Does anybody have any idea as to why this might happen?

    Read the article

  • Is this crash in libdispatch caused by Reachability?

    - by esilver
    Can anyone tell me if this crashing stack appears to be caused by Reachability? I am running apple's latest implementation of Reachability, downloadable at https://developer.apple.com/library/ios/samplecode/reachability/Introduction/Intro.html I have an app where ARC is not enabled by default (it is a legacy app) but I enable it on a per-file basis. I have enabled -fobjc-arc for Reachability.m When I look at these threads, my code is nowhere to be found. I see some activity happening because of a WebHTMLView (probably the ad network view code currently on screen; it's not mine). On Thread 10, I see a SCNetworkReachabilityDeallocate, then a dispatch_semaphore_wait_slow, and the crash happens on Thread 14 in libdispatch. Do you think this crash is being caused by that Reachability code, and have I erred in using -fobjc-arc with Reachability.m? Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x2000000c Triggered by Thread: 14 Thread 0: 0 libsystem_kernel.dylib 0x39cafa84 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x39caf87c mach_msg + 36 2 CoreFoundation 0x2f3e255c __CFRunLoopServiceMachPort + 152 3 CoreFoundation 0x2f3e0cc2 __CFRunLoopRun + 858 4 CoreFoundation 0x2f34b53c CFRunLoopRunSpecific + 520 5 CoreFoundation 0x2f34b31e CFRunLoopRunInMode + 102 6 GraphicsServices 0x340822e6 GSEventRunModal + 134 7 UIKit 0x31c021e0 UIApplicationMain + 1132 8 MyApp 0x00053ad4 main (main.m:33) 9 libdyld.dylib 0x39c0bab4 start + 0 Thread 1: 0 libsystem_kernel.dylib 0x39caf838 kevent64 + 24 1 libdispatch.dylib 0x39bfe0d0 _dispatch_mgr_invoke + 228 2 libdispatch.dylib 0x39bf863e _dispatch_mgr_thread + 34 Thread 2 name: com.apple.NSURLConnectionLoader Thread 2: 0 libsystem_kernel.dylib 0x39cb0910 close + 8 1 CoreFoundation 0x2f370ef6 CFSocketInvalidate + 434 2 CFNetwork 0x2f0122a2 Schedulables::_SchedulablesInvalidateApplierFunction(void const*, void*) + 14 3 CoreFoundation 0x2f34af6e CFArrayApplyFunction + 34 4 CFNetwork 0x2f011a94 SocketStream::close(void const*) + 280 5 CFNetwork 0x2f01194e CoreStreamBase::_streamInterface_Close() + 46 6 CFNetwork 0x2f030286 HTTPReadFilter::_streamImpl_Close() + 66 7 CFNetwork 0x2f01194e CoreStreamBase::_streamInterface_Close() + 46 8 CFNetwork 0x2f0301c6 NetConnection::shutdownConnectionStreams() + 98 9 CFNetwork 0x2f0309c8 NetConnection::closeStreamsIfPossibleOrSignalThatThatNeedsToBeDonePrettyPlease() + 56 10 CFNetwork 0x2f030d12 HTTPConnectionCacheEntry::removeUnauthConnection(NetConnection*) + 182 11 CoreFoundation 0x2f34af6e CFArrayApplyFunction + 34 12 CFNetwork 0x2f075678 HTTPConnectionCacheEntry::purgeIdleConnections(double, double) + 256 13 CFNetwork 0x2f030ad4 HTTPConnectionCache::performIdleSweep() + 156 14 CFNetwork 0x2f073b42 HTTPConnectionCache::timeoutIdleCellConnections() + 18 15 CFNetwork 0x2f0b3394 ___ZNK17CoreSchedulingSet13_performAsyncEPKcU13block_pointerFvvE_block_invoke + 16 16 CoreFoundation 0x2f34af6e CFArrayApplyFunction + 34 17 CFNetwork 0x2f019f10 RunloopBlockContext::perform() + 160 18 CFNetwork 0x2f019de2 MultiplexerSource::perform() + 218 19 CFNetwork 0x2f019c70 MultiplexerSource::_perform(void*) + 44 20 CoreFoundation 0x2f3e2f24 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12 21 CoreFoundation 0x2f3e23ea __CFRunLoopDoSources0 + 202 22 CoreFoundation 0x2f3e0bda __CFRunLoopRun + 626 23 CoreFoundation 0x2f34b53c CFRunLoopRunSpecific + 520 24 CoreFoundation 0x2f34b31e CFRunLoopRunInMode + 102 25 Foundation 0x2fd8664c +[NSURLConnection(Loader) _resourceLoadLoop:] + 316 26 Foundation 0x2fdfbdc2 __NSThread__main__ + 1058 27 libsystem_pthread.dylib 0x39d28c5a _pthread_body + 138 28 libsystem_pthread.dylib 0x39d28bca _pthread_start + 98 29 libsystem_pthread.dylib 0x39d26ccc thread_start + 4 Thread 3 name: WebThread Thread 3: 0 CoreGraphics 0x2f49163c CGRectIsEmpty + 0 1 WebCore 0x37291700 -[WAKView setNeedsDisplayInRect:] + 76 2 WebKit 0x37cad22a -[WebHTMLView setNeedsDisplayInRect:] + 214 3 WebCore 0x372915cc WebCore::ScrollView::platformRepaintContentRectangle(WebCore::IntRect const&, bool) + 148 4 WebCore 0x37291412 WebCore::ScrollView::repaintContentRectangle(WebCore::IntRect const&, bool) + 98 5 WebCore 0x37291272 WebCore::FrameView::doDeferredRepaints() + 90 6 WebCore 0x372dc96c WebCore::FrameView::layout(bool) + 1748 7 WebCore 0x3721fb94 WebCore::ThreadTimers::sharedTimerFiredInternal() + 132 8 WebCore 0x3721fae6 WebCore::timerFired(__CFRunLoopTimer*, void*) + 22 9 CoreFoundation 0x2f3e2e84 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12 10 CoreFoundation 0x2f3e2a9e __CFRunLoopDoTimer + 790 11 CoreFoundation 0x2f3e0e26 __CFRunLoopRun + 1214 12 CoreFoundation 0x2f34b53c CFRunLoopRunSpecific + 520 13 CoreFoundation 0x2f34b31e CFRunLoopRunInMode + 102 14 WebCore 0x372ae7d8 RunWebThread(void*) + 416 15 libsystem_pthread.dylib 0x39d28c5a _pthread_body + 138 16 libsystem_pthread.dylib 0x39d28bca _pthread_start + 98 17 libsystem_pthread.dylib 0x39d26ccc thread_start + 4 Thread 4: 0 libsystem_kernel.dylib 0x39cafa84 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x39caf87c mach_msg + 36 2 CoreFoundation 0x2f3e255c __CFRunLoopServiceMachPort + 152 3 CoreFoundation 0x2f3e0c7c __CFRunLoopRun + 788 4 CoreFoundation 0x2f34b53c CFRunLoopRunSpecific + 520 5 CoreFoundation 0x2f34b31e CFRunLoopRunInMode + 102 6 libAVFAudio.dylib 0x2e3295ae GenericRunLoopThread::Entry(void*) + 126 7 libAVFAudio.dylib 0x2e31dbf4 CAPThread::Entry(CAPThread*) + 176 8 libsystem_pthread.dylib 0x39d28c5a _pthread_body + 138 9 libsystem_pthread.dylib 0x39d28bca _pthread_start + 98 10 libsystem_pthread.dylib 0x39d26ccc thread_start + 4 Thread 5 name: JavaScriptCore::BlockFree Thread 5: 0 libsystem_kernel.dylib 0x39cc1f38 __psynch_cvwait + 24 1 libsystem_pthread.dylib 0x39d28262 _pthread_cond_wait + 538 2 libsystem_pthread.dylib 0x39d2903c pthread_cond_wait + 36 3 JavaScriptCore 0x3036f408 JSC::BlockAllocator::blockFreeingThreadMain() + 204 4 JavaScriptCore 0x3036ca70 WTF::wtfThreadEntryPoint(void*) + 12 5 libsystem_pthread.dylib 0x39d28c5a _pthread_body + 138 6 libsystem_pthread.dylib 0x39d28bca _pthread_start + 98 7 libsystem_pthread.dylib 0x39d26ccc thread_start + 4 Thread 6 name: JavaScriptCore::Marking Thread 6: 0 libsystem_kernel.dylib 0x39cc1f38 __psynch_cvwait + 24 1 libsystem_pthread.dylib 0x39d28262 _pthread_cond_wait + 538 2 libsystem_pthread.dylib 0x39d2903c pthread_cond_wait + 36 3 JavaScriptCore 0x3050daf2 JSC::GCThread::waitForNextPhase() + 74 4 JavaScriptCore 0x3050db4c JSC::GCThread::gcThreadMain() + 48 5 JavaScriptCore 0x3036ca70 WTF::wtfThreadEntryPoint(void*) + 12 6 libsystem_pthread.dylib 0x39d28c5a _pthread_body + 138 7 libsystem_pthread.dylib 0x39d28bca _pthread_start + 98 8 libsystem_pthread.dylib 0x39d26ccc thread_start + 4 Thread 7 name: com.apple.CFSocket.private Thread 7: 0 libsystem_kernel.dylib 0x39cc2440 select$DARWIN_EXTSN + 20 1 CoreFoundation 0x2f3e645e __CFSocketManager + 482 2 libsystem_pthread.dylib 0x39d28c5a _pthread_body + 138 3 libsystem_pthread.dylib 0x39d28bca _pthread_start + 98 4 libsystem_pthread.dylib 0x39d26ccc thread_start + 4 Thread 8 name: AFNetworking Thread 8: 0 libsystem_kernel.dylib 0x39cafa84 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x39caf87c mach_msg + 36 2 CoreFoundation 0x2f3e255c __CFRunLoopServiceMachPort + 152 3 CoreFoundation 0x2f3e0c7c __CFRunLoopRun + 788 4 CoreFoundation 0x2f34b53c CFRunLoopRunSpecific + 520 5 CoreFoundation 0x2f34b31e CFRunLoopRunInMode + 102 6 Foundation 0x2fd39822 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250 7 Foundation 0x2fd8a664 -[NSRunLoop(NSRunLoop) run] + 76 8 MyApp 0x002c33d0 +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:184) 9 Foundation 0x2fdfbdc2 __NSThread__main__ + 1058 10 libsystem_pthread.dylib 0x39d28c5a _pthread_body + 138 11 libsystem_pthread.dylib 0x39d28bca _pthread_start + 98 12 libsystem_pthread.dylib 0x39d26ccc thread_start + 4 Thread 9 name: WebCore: CFNetwork Loader Thread 9: 0 libsystem_kernel.dylib 0x39cafa84 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x39caf87c mach_msg + 36 2 CoreFoundation 0x2f3e255c __CFRunLoopServiceMachPort + 152 3 CoreFoundation 0x2f3e0c7c __CFRunLoopRun + 788 4 CoreFoundation 0x2f34b53c CFRunLoopRunSpecific + 520 5 CoreFoundation 0x2f34b31e CFRunLoopRunInMode + 102 6 WebCore 0x372f7872 WebCore::runLoaderThread(void*) + 250 7 JavaScriptCore 0x3036ca70 WTF::wtfThreadEntryPoint(void*) + 12 8 libsystem_pthread.dylib 0x39d28c5a _pthread_body + 138 9 libsystem_pthread.dylib 0x39d28bca _pthread_start + 98 10 libsystem_pthread.dylib 0x39d26ccc thread_start + 4 Thread 10: 0 libsystem_kernel.dylib 0x39cafad4 semaphore_wait_trap + 8 1 libdispatch.dylib 0x39bfcdec _dispatch_semaphore_wait_slow + 172 2 libxpc.dylib 0x39d370d6 xpc_connection_send_message_with_reply_sync + 150 3 SystemConfiguration 0x31b77362 _reach_server_target_remove + 90 4 SystemConfiguration 0x31b772d2 __SCNetworkReachabilityServer_targetRemove + 38 5 SystemConfiguration 0x31b5e318 __SCNetworkReachabilityDeallocate + 92 6 CoreFoundation 0x2f347efc CFRelease + 464 7 libdispatch.dylib 0x39bfc7e0 _dispatch_root_queue_drain + 220 8 libdispatch.dylib 0x39bfc9cc _dispatch_worker_thread2 + 52 9 libsystem_pthread.dylib 0x39d26dfc _pthread_wqthread + 296 10 libsystem_pthread.dylib 0x39d26cc0 start_wqthread + 4 Thread 11: 0 libsystem_kernel.dylib 0x39cc2c7c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x39d26e06 _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x39d26cc0 start_wqthread + 4 Thread 12: 0 libsystem_kernel.dylib 0x39cc2c7c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x39d26e06 _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x39d26cc0 start_wqthread + 4 Thread 13: 0 libsystem_kernel.dylib 0x39cafa84 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x39caf87c mach_msg + 36 2 CoreFoundation 0x2f3e255c __CFRunLoopServiceMachPort + 152 3 CoreFoundation 0x2f3e0c7c __CFRunLoopRun + 788 4 CoreFoundation 0x2f34b53c CFRunLoopRunSpecific + 520 5 CoreFoundation 0x2f38f1a6 CFRunLoopRun + 94 6 CoreMotion 0x2fa03394 ___lldb_unnamed_function1407$$CoreMotion + 724 7 libsystem_pthread.dylib 0x39d28c5a _pthread_body + 138 8 libsystem_pthread.dylib 0x39d28bca _pthread_start + 98 9 libsystem_pthread.dylib 0x39d26ccc thread_start + 4 Thread 14 Crashed: 0 libobjc.A.dylib 0x3970db66 objc_msgSend + 6 1 CoreFoundation 0x2f347f58 CFRelease + 556 2 libdispatch.dylib 0x39bf7100 _dispatch_call_block_and_release + 8 3 libdispatch.dylib 0x39bfbe72 _dispatch_queue_drain + 370 4 libdispatch.dylib 0x39bf8f96 _dispatch_queue_invoke + 38 5 libdispatch.dylib 0x39bfc74e _dispatch_root_queue_drain + 74 6 libdispatch.dylib 0x39bfc9cc _dispatch_worker_thread2 + 52 7 libsystem_pthread.dylib 0x39d26dfc _pthread_wqthread + 296 8 libsystem_pthread.dylib 0x39d26cc0 start_wqthread + 4

    Read the article

  • Settings for RTMP and AS 3.0

    - by coderex
    Hi, Is there any extra code need for using rtmp with AS3. I have the code like this. Is that enough for rtmp or any other code needed? var strSource:String = "rtmp://myserver.com/file.flv"; var ncConnection = new NetConnection(); var nsStream = new NetStream(ncConnection); nsStream.play(strSource);

    Read the article

  • Flash -> ByteArray -> AMFPHP -> Invalid Image !??

    - by undefined
    Hi, Im loading images into Flash and using JPGEncoder to encode the image to a ByteArray and send this to AMF PHP which writes out the bytearray to a file. This all appears to work correctly and I can download the resulting file in Photoshop CS4 absolutely fine. When i try to open it from the desktop or open it back in Flash it doesnt work... Picasa my default image browser says "Invalid" Here is the code i use to write the bytearray to a file - $jpg = $GLOBALS["HTTP_RAW_POST_DATA"]; file_put_contents($filename, $jpg); That's it ... I use the NetConnection class to connect and call the service, do I need to say Im sending jpg data? I assumed that JPGEncoder took care of that. How can I validate the bytearray before writing the file? Do I need to set MIME type or something .. excuse the slightly noob questions, a little knowledge can be a dangerous thing. Thanks --------------------------------------- PART II ------------------------------------------ Here is some code - 1) load the image into Flash player item.load(); function _onImageDataLoaded(evt:Event):void { var tmpFileRef:FileReference=FileReference(evt.target); image_loader=new Loader ; image_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, _onImageLoaded); image_loader.loadBytes(tmpFileRef.data); } function _onImageLoaded(evt:Event):void { bitmap=Bitmap(evt.target.content); bitmap.smoothing=true; if (bitmap.width>MAX_WIDTH||bitmap.height>MAX_HEIGHT) { resizeBitmap(bitmap); } uploadResizedImage(bitmap); } function resizeBitmap(target:Bitmap):void { if (target.height>target.width) { target.width=MAX_WIDTH; target.scaleY=target.scaleX; } else if (target.width >= target.height) { target.height=MAX_HEIGHT; target.scaleX=target.scaleY; } } function uploadResizedImage(target:Bitmap):void { var _bmd:BitmapData=new BitmapData(target.width,target.height); _bmd.draw(target, new Matrix(target.scaleX, 0, 0, target.scaleY)); var encoded_jpg:JPGEncoder=new JPGEncoder(90); var jpg_binary:ByteArray=encoded_jpg.encode(_bmd); _uploadService=new NetConnection(); _uploadService.objectEncoding=ObjectEncoding.AMF3 _uploadService.connect("http://.../amfphp/gateway.php"); _uploadService.call("UploadService.receiveByteArray",new Responder(success, error), jpg_binary, currentImageFilename); } Many thanks for you help

    Read the article

  • Passing in **kwargs from Flex over PyAMF

    - by cookiecaper
    Anyone know if it is easily possible to send **kwargs over PyAMF from NetConnection.call()? I would like it. I could write a wrapper around the actual function and expose that and perform some parsing manually to determine the kwargs to pass in, but I don't want to do that. I will just use a normal argument list in that case.

    Read the article

  • Flash (ActionScript 3): how to build a remoting application

    - by Lothar
    Hi, I'm looking for examples (code) of applications that uses Flash (NOT Flex) and Remoting classes for ActionScript 3 (NetConnection). Once there was ARP, a repository of code of this kind, but it seems there is not anymore. I'm trying to figure out how to build an applications that makes heavy use of calls to WebORB and responders. I need an architect point of view, NOT a sample of communication between parts, but a real world scenario.

    Read the article

  • Returning errors from AMFPHP on purpose.

    - by Morieris
    When using flash remoting with amfphp, what can I write in php that will trigger the 'status' method that I set up in my Responder in Flash? Or more generally, how can I determine if the service call has failed? The ideal solution for me would be to throw some exception in php serverside, and catch that exception in flash clientside... How do other people handle server errors with flash remoting? var responder = new Responder( function() { trace("some normal execution finished successfully. this is fine."); }, function(e) { trace("how do I make this trigger when my server tells me something bad happened?"); } ); myService = new NetConnection; myService.connect("http://localhost:88/amfphp/gateway.php"); myService.call("someclass.someservice", responder);

    Read the article

  • FMS: Stream.play on server side makes video choppy

    - by Tinelise
    I have an *.flv file on a FMS. When I play it on the client side the video plays just fine, but when I call Stream.play(filename, 0, -1, false) on the server side the video turns out really choppy. I both cases I use NetConnection to connect to an rtmp and NetStream to play the stream, but in one case I connect to a stream and request the server to play my file on that stream. Apparently that doesn't work with files? It works just fine for live streams. I really don't get why this should differ at all. Any suggestions?

    Read the article

  • ' send fail ' when server resource is unavailable-how can we handle such exceptions in flex ?

    - by developer
    ' send fail ' when server resource is unavailable-how can we handle such exceptions in flex ? i designed Air Application which pulls data from Jetty server, at a time of loading application, but here is a exception is ...am getting 'Send Fail' when server resource is not available & [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://ip"port/myapp/My-amf... how can i handle exceptions like when server is off, when server is on but DB server is not available ? please help me , thanks in advance

    Read the article

  • Flex service in debug

    - by Tom
    Hello everybody, I am trying to learn the new services method in flex 4. but i can´t get it work. A test oparation near the service in flash builder 4 works. But when i run the code i get NetConnection.Call.Failed: HTTP: Failed. Does somebody knows what the problem can be? Tom CODE: PHP <?php class AuthService { public function login($username, $password) { return 'ok'; } public function logout() { return true; } } ?> FLEX <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:authservice="services.authservice.*"> <fx:Script> <![CDATA[ import mx.controls.Alert; protected function button_clickHandler(event:MouseEvent):void { loginResult.token = authService.login(username, password); } ]]> </fx:Script> <fx:Declarations> <s:CallResponder id="loginResult"/> <authservice:AuthService id="authService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <s:Button x="97" y="193" label="Button" id="button" click="button_clickHandler(event)"/> <s:TextInput x="91" y="87" id="username"/> <s:TextInput x="97" y="117" id="password"/> </s:Application

    Read the article

  • AMF data is incomplete with Flex Service

    - by Tom
    Hello everybody. I am bussy with a Flex Project with a data services. Flash builder installed Zend Framework with Zend_Amf. When i run the project i get the error NetConnection.Call.Failed: HTTP: Failed. With chalers i say that Zend_Amf give the error: AMF data is incomplete (0 bytes of 0 bytes). Please check the recording limits in the Recording Settings. I don't know what the problem means. I have searched on google, but i haven't found a good result. The Flex project code is: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:authservice="services.authservice.*"> <fx:Script> <![CDATA[ import mx.controls.Alert; protected function click_me_clickHandler(event:MouseEvent):void { text.text += "Test started"; testmeResult.token = authService.testme(); text.text += testmeResult.lastResult text.text += "Test ended"; } ]]> </fx:Script> <fx:Declarations> <s:CallResponder id="testmeResult"/> <authservice:AuthService id="authService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <s:Button x="124" y="85" label="Click Me!" id="click_me" click="click_me_clickHandler(event)"/> <s:RichText x="58" y="114" width="238" height="182" id="text"/> </s:Application> The php code is: <?php class AuthService { public function testme() { return 'ik ben getest op'+date('d-m-Y H:i:s', time()); } }?> Please, help me!

    Read the article

  • How to play .3gp videos in mobile using RTMP (FMS) and HTTP?

    - by Sunil Kumar
    Hi I am not able to play video on mobile device which is .3gp container and H.263 / AMR_NB encoded. I just want to play my website videos in mobile device also just like youtube.com. I want to use RTMP and HTTP both. My requirement is as follows- Which codec and container will be best? Should I use FLV to play video on mobile device? RTSP required or can be use RTMP? Is NetStream and NetConnection methods different from Flash Player in Flash Lite Player? How to play 3gp video using RTMP stream ie. ns.play(“mp4:mobilevideo.3gp”, 0, -1, true) is it ok or any thing else required? For mobile browser and computer browser, can I use single player or I have to make different player for computer browser and mobile browser? It would be better if I can do it with single player for both mobile and computer browser. Sample code required for testing. If you can. I got below article in which they mention that we can play video 3gp container in mobile also. Please find the article. Articles URL- http://www.hsharma.com/tech/articles/flash-lite-30-video-formats-and-video-volume/ http://www.adobe.com/devnet/logged_in/dmotamedi_fms3.html Thanks Sunil Kumar

    Read the article

1 2  | Next Page >