ActionScript 3.0 :: Opening Local Files Using A URLRequest?
Nov 16, 2009is it possible to open a file from say C drive when your flash file is in C:somefolder?
View 1 Repliesis it possible to open a file from say C drive when your flash file is in C:somefolder?
View 1 RepliesI'm using a var and an Array code on an empty move clip. The code is set on an "Actions" layer. The code checks good. All files are on my desktop.When I test movie I get 'Error opening [url]...I'm on Mac running CS3. Flash setting is set to "Access local files only" I searched hours for a solution to this problem.[code]...
View 4 RepliesI'm trying to load a local xml file:
xmlLoader.load(new URLRequest("../xml/xmlData.xml"));
But I'm getting this security sandbox violation:
#2148: Only local-with-filesystem and trusted local SWF files may access local resources.
I don't get this error when I embed the XML file directly with the EMBED metadata tag.
I have this thing that sends variables to a php-file. The code snippet looks like this:
Code:
var myURLRequest:URLRequest = new URLRequest("kampanjerbjudande/process_variables.php");
myURLRequest.data = myVariables;
navigateToURL(myURLRequest, '_blank');
Now, the thing is this opens the process_variables.php in a new window/tab. I want to send the variables to the file to be processed without "visibly" opening the file in a window. Do you know what I mean?
I'm creating a file with buttons and thumbnails that when clicked, opens up jpegs. I've written script that works successfully, opening the jpeg from the swf in Preview. This works for my desktop. However when using my laptop, the jpeg opens in Opera.
How do I write the code so that the jpegs open in Preview by default regardless of what computer one is using? Below is the script:
domino_mc.addEventListener(MouseEvent.CLICK, dominoClickFunction);
function dominoClickFunction(e:MouseEvent) {
var url:String = "domino.jpg";
var request:URLRequest = new URLRequest(url);
navigateToURL(request);
}
buttonMode = true;
I'm looking at writing an app with Adobe AIR, but I wanted to figure out if this is feasible with the platform first. (Mostly new to Flash and AIR).What I would like to do is know ahead of time what local port a URLRequest will be using. If possible, I would like to hold a connection open even and keep using the same socket.What I'm basically trying to accomplish is doing some NAT-Traversal and port negotiation ahead of time. Once I have both the client and the server negotiated, I'd like them to connect and basically use HTTP in a peer-to-peer way to stream media, like this sample:
var s = new air.Sound();
var url = "http://www.example.com/sounds/bigSound.mp3";
var req = new air.URLRequest(url); [code].........
The problem is that I don't see this happening unless I can get some information from AIR on what ports it's planning to use. I would be OK with creating my own Socket connections to the server and using them, but I would need a way to leverage the Sound framework to stream in the same way from a socket.
I want to make an application that loads some images with a Loader by making URLRequests to a local folder. Can I build the application and include somehow this folder so when I send it from a server to a client the URLRequests operate normally on clients side? Also if this is possible, the folder may be not viewable/accessible by the client but only from the Flash application that comes with it? So for example, this piece of code that runs nicely, locally, to my machine, if i send it to a client will continue to run to its machine. Can somehow send the folder and the SWF as one object?
private function clothesOn( outfit:String ) {
var clothier:Loader = new Loader();
var item:String = "clothes/" + outfit + ".gif";
var getItem:URLRequest = new URLRequest( item );
clothier.load( getItem );
this.addChild( clothier );
}
My users upload a certain kind of text file that sometimeshas references to images stored locally on their hard drive. I needto check this file either on the server or within a flash app tosee if it has these references and then grab those images in aflash app to upload to my server.So I can use FileReference easily enough to have users uploadlocal images. But FileReference requires users to select their files with a dialog box. I can't have that. Myusers wouldn't know where to look and there are typically way toomany files, sometimes with the same name but in differentdirectories.
I can also just use URLLoader with a local URL, I guess I canprobably just use Loader too? That works great. The problem here isI can't communicate with both the server and the local filesystemin the same flash application due to Flash's security sandboxrestrictions. So I can get out of those security restrictions byplacing or editing a trust file in designated locations on variousOSes. I then need to install this trust file which is more invasiveand confusing to users then I want to be...Java's method of accessing local files from a web applet bysimply signing the applet with a certificate and having a dialogbox popup where the users grants access is ideal. Is there anything
I am having trouble loading multiple xml files when the button is clicked.
View 5 RepliesA work partner is using Flash CS3 on a Mac. She sends me her .fla files for me to edit which I cannot open.I'm using Flash CS4 on a PC.Is there a simple way to fix this problem; it's driving us crazy and really slowing down development. I haven't had this problem before working between PC and Mac formats...
View 5 RepliesWhat I want to achieve is to be able to be running a .swf file that I've coded using actionscript, and to click a button in there and have it bring up my computer's finder window (or the my computer/documents/whatever you want to call it on a windows) so you can bring in a file from on the computer. If that's a bit vague, I want to be able to add music to a library (like iTunes) .. Basically. All I want to know is if it's possible to open a file from outside the swf and put it on the stage.
I'd also like to know if it's possible to... save (for lack of a better word) the files that are on the .swf so that the next time you open it they're still there.
I was using Flash MX 2004, but I thought it was time to update so I got Flash CS4. All my old files work when working in Actionscript 2.0 but then when I try and open using AC 3.0 everything dissapears but still remains selectable. The is no old actionscript in the file at all, so I thought maybe it somthing to do with the movieClips.
View 2 Repliesi am loading some pages/images from some folder whose path is specified in the Xml used like this:
<page src="user/_IMAGES_//image_0002.png" />
I am using Chinese /Japanese text in this Now the problem is that when i run it in the flash it loads those pages and when i load it in the browser then that file doesn't load anything.
I'm working on a Flash project (which will eventually be published as an .exe - not sure if that makes any difference) which has buttons which need to open up external files.The external file will vary in type (there will be at least one button each for .pdf, .exe and .swf).I've managed to get this from various online help things:
Code:
function f_testURLOpener()
{
var url:String = "BWorking.exe";
var request:URLRequest=new URLRequest(url);
navigateToURL(request);
}
I've tested it with about 5 different file types and it only seems to work if the url String begins with "http://". Even local htm/ html files don't open.
Does anyone know if there is a way to open and edit a SWF file.
View 2 RepliesI am trying to make a button to execute exe files. so I made a windows projector file and its working fine. But the problem is, i need this to happend when working in browser. how to embed the exe files in browser or atleast in another swf file, so that i can call .exe in browser itself.
View 1 Replieshow do I open a word file in Windows XP (and others!) from a button in a flash presentation? I sow some tutorials but it didn�t work so well...
View 8 RepliesIn my movie i have a link button with following, simple, function creating a link:
[Code]...
lately i've associated a class file (.as) to my movie and immediately after, when publishing the movie i got the following error message: 1046: Type was not found or was not a compile-time constant: URLRequest. as well as a couple of other related error messages: 1180: Call to a possibly undefined method URLRequest. 1180: Call to a possibly undefined method navigateToURL. when i remove the link to the class file, the problem goes away. also, i have checked the class file for mentioning of "URLRequest" and nothing is there.
I'm making a DVD menu in flash. It will open several kinds of files. .mov .avi . ppt . pdf etc.But i want to open those files directly, without prompting. When i try to open non web files, a popup window appears, as shown in this screenshot:
[Code]...
I am brand new to Flash and I am completely unsure on how to diagnose and resolve the problems I am having.I am in an online program through the Art Institute and I am currently taking a course to learn the basics of Flash.I am running Flash from CS4 on my MacBook Pro running OS X 10.6.8 and I am having problems opening some of the .fla files that people post. One of two things happens, either:
(1) when I try to open the .fla file I get an pop-up alert (below) and if I click OK the file doesn't open (and clicking OK is my only option, as you see);
(2) I go to open the .fla file and it appears to be opening but then the screen is blank and I get two error reports in the Output pane which says:"VerifyError: Error #1053: Illegal override of isRelatedObjectInaccessible in .RemappedMouseEvent.ReferenceError: Error #1065: Variable_ e9a7 52f233536079fc4486d6ac92a1b05a633a5657d5b83ad7fac2246298 b191_flash_ display_ Sprite is not defined."I tried installing all available updates for Flash and that did not solve it. I also tried opening the same .fla files on my husbands MacBook Pro OS X 10.6.8 running CS4 and got the same problems.
Im always encountering this same bug since I got Flash CS5 everytime I open multiple files on Flash, my instance names lock in this case I have to restart flash and pray the instance names wont lock up again... It's really getting annoying because I could be working on up to 10 files at a time which forces me to individually open each file everytime I start my project.
View 1 RepliesI want to load multiple files at one time; I mean that when the open dialog file comes up, I want to be able to select multiple files and then hold the path of them. I know the FileReference Class but it will only get one file at a time. so is there a way to do it??
View 1 RepliesI want to read a text file that contains information for my game. I need to read chunks, and create the objects immediately and so on. How is the best way to do so, and is it possible to use some sort of location pointer so I won't have to go through the whole file every time I read a chunk?
View 4 RepliesI've had Flash CS4 (a legally purchased single-user licence) since the day it came out and used it practically every day without any major problems. Today I opened it up to carry on with some work, and it crashed. I had a whole host of other stuff that was open and updating at the same time, so I waited until that was done, then I tried again. It crashed. So I rebooted, and tried again. It crashed. Slightly panicked, I uninstalled Flash CS4, rebooted, re-installed it, and tried again. It crashed. Panic giving way to anger, I googled the issue, and this time uninstalled, with 'Remove user preferences' checked, went through my Windows system and manually deleted any associated files in my Application Data folder, rebooted, reinstalled, rebooted, and tried again. It crashed.
I have now just downloaded the Adobe CS4 Cleanup utility and run it, but after twenty minutes hanging at the 'Removing all session folders' screen and no processor activity I could see, I quit the program. I'm tempted to try reinstalling again (obviously) but I'm pretty sure I know what's going to happen.Just so it's clear, here are a list of the variables involved:Registered single-user licence of Flash CS4, running without issue since 2008Windows XP SP3The Flash IDE opens fine on its own, but crashes when it tries to open ANY Flash fileI have CS4 installed on my laptop, and that can open the same files fineAny
Can I import files from other apps into my app? If I for instance on iOS, I email myself a xml-file, I click the attachment in the mail-app. Now I want the "open in" option to show up, send that file to my app, and process that data there. Is this possible in flex/as3?
View 1 Replieswondering if you can give me a hand; I am constructing my portfolio on CD ROM; On the ROM I have various formatted files (such as Acrobat, Quicktime and Powerpoint) that I would like to access via my simple Flash MX interface. As I can't pull all of these into my swf, is there any ActionScript for my interface that can let me access these files?
View 3 RepliesI would like to update the swf player that I specify into FDT and what Flash IDE uses to play files, namely from Flash 10 to Flash 11 for Stage3d preview. How does one do this?
View 2 RepliesI have wmv files that i need available for download from answf (both swf and .wmv's will be on a DVD or CD). The wmv files arein a folder named WMV which is at the same level as the swf. I justwant the user to be able to click on a button and select "Save As"and download the file. I've been trying to use the download()method but keep getting IO Errors and also tried usingnavigateToURL but it tries to download it through firefox (no "SaveAs" option, just tries to open with Windows Media Player) andwindows media player says it can't find the fil
View 7 RepliesI want to lik the images and swf to local files but I'm not able to do so. I took the code from an accordian menu tutorial
[Code]...
is it possible to load something thats in you library, as a external movie. or is it possible to "preload" a external .swf?
View 2 Replies