ActionScript 3.0 :: Load A File Over The Local Network With Loader Class?
Aug 24, 2011
I try to load a file over the local network with Loader Class but I get the error "URL Not Found". I use a path like this "file://///myPCnetID/pubilcFolder/pictures/mypic.jpg" which refers to a folder on the same PC I compile and run the Air flash file.
When I copy the adress into the browser the jpg-file ist displayed corretly.
I've been fooling with this problem since AS2.0 (and shared Objects) and I'm not much closer to solving it, partly because every article I read on it is focused on php and server-side stuff that doesn't apply. How to load a String Array from a txt file in local user space (the folder from which the .swf is run). What I need to know: The easiest way for the user to save/load a file. The file has to contain Objects and Arrays reflecting his current status in the game. The goal is to avoid non-Flash apps and languages, and external Classes if possible (I do everything right in the main fla). I don't mind that the user has to initiate and approve the upload/download.
I am creating a web page that allows users to upload their own swf files to my web page, which are then used by the main web page as components. This creates a security issue though because I don't want the uploaded swf files to access other files on the server.
when the main webpage starts, it loads whatever third party swf files the user specifies. Is there a way for my main web page to change the security settings of the loaded swf so that the loaded swf is treated like it was loaded from another domain? Or is there another way I can provent these uploaded swfs from accessing local files on the server.
I have a SWF file located at the local network in the public shared folder that I do not control over trying to read the external file on the local network.
I am currently hitting instead an security violation
Error #2148: SWF file file://....mySWF.swf cannot access local resource file://...config.xml"
I've added the network path where SWF an XML file resides to "trusted locations" via Flash Player Global Settings.
The added network path is successfully displayed at the list of "trusted locations" within Global Settings Manager, but it does not look like Flash Player is able to really parse the local network path as a "trusted location"
I'm FMS beginner (server side newbie in general)... I installed FMS 3.5 (Development) on my computer which is inside of local network. Now I try to connect to rtmp service from another machine in same network using my computer's IP as I used to while connecting to my apache, but it is worthless. Everything works fine on my computer.
I was wondering if it was possible to send a string to a flash application from a flash application on the same local network? Can i put the code requiered on a mobile (android) in air?
I have a problem with FMS 3.5 installed on Windows 7. The problem is that FMS works only on my local machine, I am not able to use it from computers in local network. I turned off all windows firewalls and my machine is visible for other computers - I am able to connect to FMS Welcome site on apache on default port 8134, but streaming fails, and I cannot do the same on port 80.
For example, in local network, when Adobe Air is reading files from local server (\Serverstorage) and network will be in down for a second, Air becomes eat a lot of memory and it is increasing up to 1GB (while normal memory use is 100 kb or less).Just reading file with File('file path on local server'); from unstable network can cause this error. Have anybody seen that in projects?
private function init() : void { file = new File("\Serverdragracing
The reason Ordinarily I would just host everything on the server, the swf file and images and serve them out using something like apache. However, we're working with an embedded device with hardware limitations. So we thought we could avoid this by hosting the images locally on a cd.But Flash player moans about the security settings. I know a way to overcome this would be to give the user instructions to change the global security settings- hence allowing both network and local access. But we feel that this would be too much to expect the end user to do.We want our model to work out of the box so to speak. Or as best as possible.
Is it possible to access both network and local files, flash player 9/10?
Here is the situation:
I have an SWF which runs locally on the client's machine.
It communicates, via XML socket, to a C++ server.
It also needs to read some configuration files from the local file system...
c:config.xml <---> test.swf <---> C++ server
So I need the SWF to be fully trusted, as if it was ran from the Flash IDE.But I can't tell my clients to set it to be fully trusted using Adobe's Global Security Settings Panel
What I can do is alter my C++ server code, somehow granting permissions to the SWF.
I am having a strange issue in my flex app. I have a Video element that loads an FLV file from the same directory as the SWF app. If I move my SWF and FLV to a local directory on my computer and load the SWF in my browser, the video plays without any issues. However, if I move the same collection of files (SWF, FLV, HTML) to a network share, the video no longer loads.
[Code]...
In my netStatusHandler() callback I get an event status of: NetStream.Play.StreamNotFound.
Again, I only have this issue when loading content from a network share.
I am developing flash p2p chat. It works fine on my friends' computers (they can chat each other), but not on mine. The problem is that I have local network at home, and I think that Flash Player tries to make p2p requests to peers inside my local network.Can I check if user have local network in AS3 and up the level of network to the WWW?
When i try to load an external swf file using Loader.Load(); The swf starts playing even before the init event is fired. Is there any way to stop the swf from playing atleast until the init event or complete event is fired?
I'm trying to load a radar image over a google map. The problem is, I'd like to load the image from a local file. I understand how to do this remoteley via a url, buit not from a local file. I've read something about embedding, but I don't know what embedding means. I'm going to need this image to change, and eventaully want to have a loop of images playing over the map. Below is what I have so far. You can see I've commented out the line with the url loading, and have a fail attempt at loading locally below it.[code]...
I try to upload file from local system to web server.My application is desktop application and I work with php server.Find below my code
In flex
var dropfiles:Array = evt.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT) as Array; for each (var file:File in dropfiles){ var fileFormat:String = file.extension; var fileUrl:String = file.url;
[code]....
With those code message "Error #2044: Unhandled IOErrorEvent:" appear on flex.
I have a flash rotating banner script that I purchased, and wish to incorporate into my homepage. Instead of creating a page with HTML and adding the banner code as a separate object on the page, I wish to load it as an external swf into a movieclip on my stage. This is what the banner looks like:
[URL]
I have a page that I'm redesigning, it's located at:
[URL]
I have a movieclip named load_banner. Inside the movieclip in its own frame, I put in the following code:
I'm trying to load an image in a movieclip using using the following:
Load_image_btn.addEventListener(MouseEvent.CLICK,Load_image); function Load_image(event:MouseEvent):void{ var my_loader:Loader = new Loader(); my_loader.load(new URLRequest("C:UsersAmandaDesktoppicture1")); addChild(my_loader);}
I know it's possible to load and save a local file using CS4 and Flash Player 10, but my question is if I can load a SWF local file without using 'browse' and 'load' methods and then save it. I really pretend to "copy" a specific SWF local file into another folder on my HD and I think this is possible loading first this file and then saving it. For this reason I don't want the dialog box appears (with browse method). ('maybe with 'Loader'?)
I thought that you could load a file into flash using FileReference. But as far as I understand you have to upload the file to a server and then download it from the server into your flash app to access it?It seems a bit like going passed the river for water (bad translation of swedish expression).
I just want to ask if is it possible to load a movieclip from the library using the Loader class together with the URLRequest and then use gotoAndPlay method?
I want to load an image from altavsita into my swf with loader class.Then I get this error message.From my flashdevelop flash player everything works fine.But from all others I get:[code]
I am trying to load external swf's from buttons. I managed to load an external swf from a button, but as a result I can't work out how to get it to unload when other buttons are clicked. Currently In the flash file I have only 2 buttons 'dutrain_b' and 'portfolio_b'. I would like to add many more when the code is working.
In a very simple first AIR application (I'm using Flash Builder 4.5), I am trying to accomplish the following on my MacBook:
Read a local file (JSON format) into the AIR app. Parse through the file. Display some selected contents in a grid.
That's it.
I've found an example that does some simple JSON parsing in Flex, but the problem is that it loads the JSON source from a remote web site.
So do I need to load any file-specific libraries to make this work in AIR? Or can I simply refer to the file by using the Mac file-path? I just want the local file to be the JSON source. The parsing is already taken care of.
This is really irritating me. In ruby it is very simple to load an mp3 file via its file class and manipulate it, even play it. (Yes, I am aware that this is as3 ).According to what the stdlib documentation says I should be able to use:
//assume I am irritated and have defined a public static variable called soundClip Main.soundClip.load(new URLRequest("C:lo1.mp3")); Main.soundClip.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
In AS3 i am using the Loader class to load in multiple external SWFs (AVM1), each of which has a short animation which automatically plays when the swf is I obviously cannot control the timeline of these (i can't use local connection etc) but would like to load in the *.swf files, so they're in memory then add them to the stage when requested. the problem is that if i load them enmass. then use addChild when they are called, they have already played through and animated pre the addChild command.
(I cannot edit the swfs at all, and would rather not load them on demand at runtime)
I'm very very new on ActionScript 3.0 for mobile development. I'm using loader class to load images. I'm loading ten images with different sizes. I'm trying to load them with a common size (300x300) doing this:
I am a developer in Web Flash Game.(I use AS3.0) I want to save and load the swf-file to a local disk of any user,Because I want to decrease the time for loading a flash movie from site.Is it possible?If it is possible, I hope the swf-file has only one loading from site and it will be loaded from a local disk of any user after that. (I know a concept of Internet temporary file. I want to know the other techniques of only using AS3.0.)