ActionScript 3.0 :: Fileref Upload With NetConnection

May 4, 2009

Is it possible to do a fileref.upload through a NetConnection, so I can call a class inside my php instead of a direct URL to my php file? now I have it like this fileRef.upload(new URLRequest("upload.php")); but I want to get it into a call function..

[Code]...

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Upload Progress With NetConnection.call For Bytearray?

Dec 23, 2011

I'm recording mic audio into a byte array as a WAV file and uploading it with NetConnection.call(amf.service,responder,bytearray ); It works fine but the files are very large and take a long time to upload. Is there any way to get the upload progress? I can't find anything in AS3 docs or on the web.

View 5 Replies

ActionScript 3.0 :: FileRef.browse Local Only Same Folder?

Oct 19, 2010

I manage to get fileRef.browse working locally to load some picture but it only works for pictures in same folder/directory as the .swf.

View 8 Replies

Php :: Flex Fileref... Not Receiving Return Result?

Feb 5, 2010

I'm attempting to upload a file using FileRef and a php script. The file uploads and it definitely returns a test string ( I can see it with a web debugger).. but I can't grab that string in my flex app. I am using a DataEvent listener and a COMPLETE listener Still no result.What am I doing wrong here?

fileRef.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, onFileResponse);
fileRef.addEventListener(Event.COMPLETE, fileRef_complete);
private function fileRef_complete(evt:Event):void{

[code]....

View 2 Replies

Flex :: Use The FileReference.upload() Function To Upload Files To Sharepoint Or Have To Use The SP Web Services

Feb 5, 2010

Can you use the FileReference.upload() function to upload files to Sharepoint or do I have to use the SP web services? This is without adding your own ASP.NET Web Services, just using the built in SP Web Services.

View 1 Replies

Flash :: Upload Only 2 Files On Domain At Time, FileReference.upload Limitations?

Jan 18, 2012

I am creating flash uploader and want to start 10 uploadings at time.But flash upload only 2 files on domain at time, other references wait for something.In IE with ActiveX Player limitation is about 6 files at time.Is there any ideas how to change this limitation? For uploading I need to use FileReference.upload without creating URLRequest object from file data.

View 1 Replies

Actionscript 3 :: Change Single-image Upload Into Batch Upload?

Feb 28, 2012

EDIT: Reworked my code a bit and decided to throw out URLLoader in favor of the ile.upload() method.Now I'm stuck again >_<Here's the code I currently have, stripped down to bare-bones:When I drag-drop image files onto my app, here is the trace log that gets returned to me:

[object Document] called.
doDragEnter() called.
doDragDrop() called.

[code]......

View 2 Replies

ActionScript 3.0 :: Using FileReference's Upload To Call A PHP Script From One Folder & Upload Elsewhere?

Sep 9, 2009

Okay, so I am calling my scripts from the folder "php/" Thus, my FileReference calls "php/upload.php" to upload. However, my uploads are in "uploads/" and not in "php/uploads". When the PHP script is called, it apparently ignores the caller (the SWF file) and looks for uploads in its own directory (the "php/" folder). It may be a PHP question, but how do I reference the uploads folder as being in the parent directory of the php files in my PHP script?

View 1 Replies

Php5 :: Upload Error 500 When Using Flash To Upload

Dec 1, 2010

I've been trying to configure uploading and I've been getting an error 500.I'm running a server on Apache2 with php5+ installed. I'm curious to why i keep getting an error.[code]I added those to my .htaccess file

View 1 Replies

ActionScript 3.0 :: Using A PHP Upload To Upload Files To Server?

Nov 8, 2011

I am using a PHP upload to upload files to server. I have a loop for the 5 files to upload....

ActionScript Code:
if (PDFFiles[i] != false){ 
PDFFiles[i].upload(uploadPHP);
}

As the loop runs quicker than PHP can upload, the success of....

ActionScript Code:
function fileUploaded(e:DataEvent):void {
trace "Success"}

....can get out of synch. It doesn't cause me any real problems but is this bad form? Or am I better to upload one file the wait for the PHP to return success before uploading the next one?

View 6 Replies

Flex :: Set A Timeout For A NetConnection?

Dec 17, 2009

Using flex 3, how do i set a timeout for a NetConnection?

code sample:

nc=new NetConnection();
nc.addEventListener (NetStatusEvent.NET_STATUS,checkConnect);
rtmpNow="rtmpe://host/test/test1";
nc.connect(rtmpNow,fuid,gameName);

View 1 Replies

Actionscript 3 :: Serialize To AMF Exactly Like NetConnection Does

Mar 15, 2012

I want to serialize an object to AMF, and I want the result to be exactly the same as if it is serialized by NetConnection.call(). So, I use ByteArray.writeObject(), and the output bytes are usually the same as bytes sent by NetConnection.call(), but sometimes couple of bytes are different.

I found this in AMF3 spec: "Note that ByteArray.writeObject uses one version of AMF to encode the entire object. Unlike NetConnection, ByteArray does not start out in AMF 0 and switch to AMF 3 (with the objectEncoding property set to AMF 3)." It explains that differences.

View 1 Replies

ActionScript 2.0 :: Turning A NetConnection Off?

Oct 9, 2008

This code is on the opening frame of one of my Flash files:

Code:
var myConnection:NetConnection = new NetConnection();
myConnection.connect("rtmp://fvss.playstream.com/fvssod/myclient");
var myStream:NetStream = new NetStream(myConnection);
myVideo.attachVideo(myStream);
myStream.play("iLoveLALong");

It starts this song "iLoveLALong" as background music. Works great. But now I need to turn the music off when I jump to another frame in the Flash doc. Can anyone suggest code that will do that, either with frame code or button code?

View 4 Replies

ActionScript 3.0 :: Delay Before NetConnection Success?

Apr 22, 2009

I'm writing an audio recorder in AS3.In AS2, when I loaded up the swf object, the "Camera and Microphone Access" window would pop up immediately. ("Requesting access to your camera and microphone .. allow").However, in AS3, it still works, but there is a noticeable 2-3 second delay before that window pops up.

View 2 Replies

ActionScript 3.0 :: Pass Netconnection To Netstream?

Apr 30, 2009

I should probably be refrencing a book rather than continueing to ask questions here but there are no books for AS 3.0 and flash media server. So this forum is my book i suppose any way here is what i have...I have 2 .as files one holding code for a netConnection and one for creating the netStream my problem is i need to pass the netConnection refrence from the netConnection.as file to the netstream....here is my failed attempt to do so I also get the following error message..ArgumentError: Error #2126: NetConnection object must be connected.

[Code]...

View 3 Replies

Flex :: Use The Flash.net.NetConnection Over Https?

Dec 4, 2009

Is it possible to use the flash.net.NetConnection object to connect to my Flash remoting enabled web application over HTTPS within Tomcat or any other servlet container?

I am using the SpiceFactory cinnamon project for amf remoting and have searched for examples of using HTTPS but see only the reference to a proxy type in the NetConnection object.

If someone could provide a reference or example that would be awesome. Or if it is not possible using the flash.net.NetConnection object are there any recommendations of how to configure HTTPS for the spicefactory cinnamon library.

View 2 Replies

NetConnection / NetStream - Any Way To Split Source URL?

Nov 22, 2011

I have to replace the mx:VideoDisplay component in an existing Flex project with a custom made component. To achieve this, I have to conform to its current Interface, so my component receives the video urls (via source parameter) in the form of either:
/data/myflvfile.flv (if the file is played locally)
rtmp://streamcloud.myserver.com/cfx/st/somedirectory/myflvfile.flv (if the file is streamed from Cloudfront)

My new component is based on NetConnection and NetStream. With any of the entries above I have to split the input in two strings: one for the NetConnection.connect(NetConnectionStr) method and the other for the NetStream.play(NetStreamStr) method. For instance:

Given /data/myflvfile.flv then:
NetConnectionStr = null
NetStreamStr = "/data/myflvfile"
[Code] .....

Building the two strings is very obvious for the "local files" case, but it gets tricky in the others. The problem is that I have no smart way to guess what part of the input is the server URL and what part is the stream name + directory structure. In some examples found on the Internet, people are simply guessing that the last part of the source (what is after the last "/" found) is the NetStream name. In my case, this is not always true because the streams may be in subdirectories on the server. It is even worse because server names may contain "/" characters!

Strategies to solve it:
Connecting to server, retrieving its real URL, finding stream name
As NetConnection seems to be "smart" enough, my first attempt was to invoke connect method with the full source url. Unfortunately, I found no way to get the real server address out of a NetConnection object (connection.uri returns back the exact input). So this seems to be a dead end. Connecting to server, iteratively retrieving streams. Another strategy could be to connect to the server and then try iteratively (starting from the very end) to play streams until it works:

Try 1: stream.play(myflvfile) FAIL
Try 2: stream.play(subdirectory/myflvfile) FAIL
Try 3: stream.play(somedirectory/subdirectory/myflvfile) SUCCESS

How to do it in the original VideoDisplay component (if it is based on NetConnection/NetStream objects?)?

View 2 Replies

ActionScript 2.0 :: File Upload - OnComplete Fired Without Any File In The Upload Dir?

Aug 31, 2010

my listener.onComplete = function(selectedFile:FileReference) is fired without any file in the upload dir. if the file is small and I wait a bit I can see the file (through FTP) coming up on the server, but most of the times the "onComplete" if fired without any file being saved.

can I add something to this php code to make sure the file is uploaded?

[Code]...

View 1 Replies

Media Server :: Get The NetConnection Out Of A Flvplayback Component?

Nov 30, 2010

[URL]
 
I followed the above example in AS2,but only get the error:
 
Call to a possibly undefined method getNetConnection through a reference with static type fl.video:INCManager.Here's my code:             this.addEventListener(Event.ENTER_FRAME,

[Code].....

View 5 Replies

Media Server :: NetConnection.proxyType Not Works?

Dec 13, 2010

I need a solution for this: when the port 1935 is closed, the NetConnection switch rtmpt (port 80). The NetConnection class built in function: proxyType="HTTP" not works or I use not rightly.In the FLVPlayback class works this function, but I don't know how..

View 7 Replies

Media Server :: NetConnection.Connect.Failed?

Jun 30, 2011

i m new for FMS I just wanna make a connection, I put swf file in FMS folder and here my codepackage{  import flash.net.NetConnection;  import flash.display.Sprite;  importflash.text.TextField;  import flash.events.NetStatusEvent;public class main extends Sprite  private var

View 3 Replies

Media Server :: Netconnection Events Not Firing?

Aug 22, 2011

Can anyone tell me why I would not be getting Netconnection.NetworkChange and Netconnection.Closed events would not be getting fired when I am working on Flash CS5?

I get the Success event, but when I am attempting to test my reconnection code I pull out my network cabled and I never get the closed event.

Interestingly, I do get the Closed and NetworkChange events when I am debugging, but not when I just run the movie.

View 7 Replies

Asp.net :: Error #2126: NetConnection Object Must Be Connected

Mar 7, 2010

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");

[code]....

View 1 Replies

Flash - Pass ...rest To A NetConnection Call?

Jun 8, 2010

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.

View 1 Replies

Flex :: Connecting To Web Server Using Flash.net.NetConnection?

Nov 17, 2010

The ActionScript 3.0 Reference says the following about flash.net.NetConnection:

The NetConnection class creates a two-way connection between a client and a server. The client can be a Flash Player or AIR application. The server can be a web server, Flash Media Server, an application server running Flash Remoting, or the Adobe Stratus service. Call NetConnection.connect() to establish the connection.

Does this mean I make a regular HTTP connection to any web server using an NetConnection object? I am a little confused about this as further down the section on the connect() method says connect(): Creates a two-way connection to an application on Flash Media Server or to Flash Remoting, or creates a two-way network endpoint for RTMFP peer-to-peer group communication....Pass an "http" URL to connect to an application server running Flash Remoting.. So, the application server has to have Flash Remoting?

View 1 Replies

ActionScript 3 :: How To Relay Complex Type Via NetConnection To FMS

Feb 22, 2011

I need to send complex type object (marked RemoteClass in Flex) via NetConnection to other clients.

[RemoteClass]
public class ComplexType {
public var _someString:String;
public var _someInt:int;
}

... and using ...
_nc = new NetConnection();
_nc.connect("rtmp://localhost/echo/");
_nc.addEventListener(NetStatusEvent.NET_STATUS, _onNetStatus);
_nc.client = {};
_nc.client.echoCallback = _echoCallback;
[Code] .....

Is there a way to relay strongly typed object via NetConnection? Added callback function source code with ObjectUtil.toString() output

View 2 Replies

Flash :: Force A Source Port On A NetConnection?

Feb 26, 2011

I'm trying to decipher a pre-existing project and make some modifications as I go.

I have a section of code that starts with creating a new NetConnection and then streaming a media file from an external source. I see in the documentation that you can provide a destination port (via the URL), but is it possible to force Flash to use a specific source port? I couldn't find a clear way to do this in the documentation, but I was curious if anyone else has an alternate method or idea.

View 3 Replies

Flash :: Share Same NetConnection Object Between Two Views?

Jun 11, 2011

Flex Mobile applications are view based. And I'm using Adobe Cirrus (im assuming its the same for any FMS netConnection) Does anyone know how to maintain a persistent netConnection between views in a flex Mobile Application?[code]I want to be able to trace(netConnection.nearID) on this view, go to another view and trace(netConnection.nearID) and get the same result. and be able to have a cirrusStatusHandler() function like I have a above to listen for cirrus events. Then be able to do netConnection.close() on another view if i wanted to to be able to close the connection.

Brainstorming Ideas what I was thinking I could do:I was thinking I could maybe set up the connection on the main ViewNavigatorApplication mxml file, but i have so much going on and being triggered based on netConnection status events it seems it might be really complicated to handle everything from that mxml file on each of the views. Maybe I could declare the netCon vars in the ViewNavigatorApplication mxml file, and just add event listeners to those vars on each view? But i'm not familiar with accessing vars that exist in the mainViewNavigatorApplication mxml file.I just need to be able to make the connection once, and then it stays persistent until I call netConnection.close()I guess I could use separate views where I dont need the netConnection and just have this particular view use "states" inside the view where the netCon needs to be persistent. It just seems silly be be using states since this is a view based application.[code]and the same in my Home View but i'm getting a null error when i try and call trace(netConnection.nearID) in the crationComplete function on profileView (which is after homeView) to see if it still has the same netConnection and should then be able to get the same nearID

View 4 Replies

Flex :: Multiple Netconnection At One Mxml Application?

Jun 13, 2011

Since I have to get data from other red5 application. is it possible using multiple netconnection in one mxml application?

View 1 Replies

ActionScript3 :: How To Handle NetConnection.Connection.Failed

Jan 16, 2012

I have a video streaming app, and it uses Flash AS3. It keeps getting a NetStatusEvent of "NetConnection.Connection.Failed", when i try to use it in my Windows Testing environment. I need to make it work in my testing environments before i can launch this product.How do i diagnose this problem?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved