ActionScript 3.0 :: AIR FileSystem - Get Full Local Access?

Dec 22, 2010

Here's a way to read/write anywhere on any local or mapped hard drive with AIR. (Coded for non-Flex):


Code:

import flash.filesystem.*;
var _drive:File = null;
var _stream:FileStream = null;

[code]....

File.GetRootDirectories() returns an array of File objects (the root of each drive, mapped or otherwise). You then compare the name of the drive (C:, D:, E:, etc) to the first two characters of the fileName variable. If you find a match, you use that File object (_drive) to resolve the full path of the file you want to open.

View 5 Replies


Similar Posts:


ActionScript 3.0 :: Error #2148: Only Local-with-filesystem And Trusted Local SWF Files May Access Local Resources

Jul 4, 2010

I'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.

View 3 Replies

Professional :: SecurityError: Error #2028: Local-with-filesystem SWF File

May 29, 2011

I've created a small application that is loaded by a preloader. The preloader loads the app then loads some json data it passes the data to the application and then puts the application on stage. Everything works fine in FDT 4 but once I put it on a server it gives me this error - SecurityError: Error #2028: Local-with-filesystem SWF file. Does anyone know why its happening and what setting I need to change to stop it? I have set the load arrguments -use-network=true and false to no availe. The json data is coming from an external web address when I change and put it locally with the application I get SecurityError 2148.

View 1 Replies

Java :: Record Webcam Video To Local Filesystem From A Browser

Jun 28, 2010

What is the best (and simplest!) way to record video from a webcam to the local filesystem--all from a browser? Ideally the video would be recorded in HD and then we could use ffmpeg later to convert it into the formats and sizes needed.

Here are some things we've looked into:

Use Flash to stream to a local Red5 server. But we've had issues with video quality here. A Java applet using JMF (can we even write to the filesystem from an applet?). We've heard this might not be very efficient though. Can it handle HD?
Write a custom Firefox plugin. Would this be very difficult?

Basically the hardest thing here is that the controls need to be embeddable into a browser. All we need is a box where the webcam frame is displayed to the user, and then some Javascript hooks so we can code start/stop buttons within the HTML page.

The computer is fully controlled (it's a kiosk) and we can do just about anything to it. We just need a solution that runs in the browser. Our current app is run in Firefox in kiosk mode and the webcam recording is just a part.

View 3 Replies

Silverlight :: A Webpage That Can Discover And Play Music From The Local Filesystem?

Oct 11, 2011

In my scenario, a user visits my webpage and is prompted to select a Music folder on her local filesystem. The web app crawls the folder and indexes it, reading all the metadata from the songs.After a few moments, the index is presented in the page's HTML and the user chooses a song to play.I can't expect to do this with pure Javascript, can I? I imagine I'll have to rely on a heavyweight object (an embedded Flash movie, a Java Web Start, an AIR app, or a Silverlight app) to scan the files and play them.

I feel confident that I could do this with a clunky Java Web Start; but is it possible with an embedded Flash movie? I'm trying to make the process as clean and streamlined as possible for the user.How should I proceed?Which framework can make this dream a reality?And how many permissions screens will the user be forced to wade through?

View 1 Replies

Javascript :: Access An Local Image (not In App Workspace) From A Local HTML File (in App Workspace)

Mar 12, 2011

I have a HTML box and load a local html file from the project. In this HTML file I use jquery and I want to load an image from my user directory. I see the image from my user directory but jquery doesn't works. I get this error:

[Code]...

But if I load an image from the app workspace, everything works fine (I see the image and Jquery works). Is this a policy problem? The error says that is a "null object reference" problem, but this can't be true...

View 2 Replies

Flash :: Access Local Access Database From It (or AIR)?

Nov 13, 2009

Is it possible for Flash or possibly Adobe AIR to have access to a local Access database?

I will have either a Flash EXE or AIR application running on a local PC (WinXP). The PC will also have a local Access database. I need my Flash application to get the data from this Access database. How would I do this?

I doubt it can be done with Flash or AIR alone (someone prove me wrong or right), but is there an option for some middle-man application to access the data base and send it on to Flash? How would this work?

Or could I read the MDB file into Flash and parse it myself? is there a library for this?

View 2 Replies

ActionScript 2.0 :: Dynamic FLVPlayback - ContentPath Require Full LOCAL Path?

Aug 9, 2007

I just created a 448x380 SWF with the following code:

[Code]...

Why doesn't that load a video? The skin partially appears, but the video does not. Hitting "Play" gives a server error, even though I'm testing locally. Does FLVPlayback need the full MACHINE PATH -- file:////blah blah blah -- to access that local file? You'd think not.

View 2 Replies

Access Local Variable From Another Class?

Apr 11, 2010

How to access a local variable from another class? I have this powerup class that changes the speed value of the enemy in enemy class(it's a game). For instance, if player hits the powerup it changes the local variable 'speed's value inside enemy class.

View 3 Replies

Publish A SWF With Local Access Permissions?

Nov 22, 2011

We have been purchased a training course made with Flash. When we received the course (a SWF file with external files inside a "data" directory, images, videos, etc), we realized that it was necessary to explicity give permissions to Flash Player to access the content in the CD drive. We think that is not a good idea to distribute a CD where the user have to do "extrange things" to make it work.
 
So, we talked with the developer and he sent us an .EXE file with the course, that obiously works fine (al the content in the CD is readed without user interaction), but it only works in Windows machines.
 
The question is: is it possible to publish an SWF that can access to the CD content without user interaction? We are almost sure that the answer is "yes" because we have a lot of "magazines" cds with SWF files that load the contents from CD (text and images) and they work perfectly "as is".

View 1 Replies

ActionScript 3.0 :: Access To Local Directories?

Apr 4, 2009

just wondering how AS3 can do this. I'm writing in Flash CS3, I just need to know the length of a directory which is in the same location as the flash file. For example there is

/flash/flash.swf

and then

/flash/images/

and I need to know the length of /images

View 7 Replies

ActionScript 3.0 :: Local File Access Isn't Possible

Jun 16, 2009

I've written a SWF in FlashDevelop (using the open Flex stuff) and use it to load up a bunch of image files.

[Code]...

Now, this works fine in the debugger environment with, say, funcA("test1.jpg"), but when I try and copy the files into another directory, I get security errors, something about it not being 'Local with trusted' or some such. I assume local file access is possible via Flash if the SWF is on the harddrive too, right? I did try adding a Security.allowDomain("*"); to see if that made a difference, but seems not. If local file access isn't possible, do I have to find a server to copy everything onto even for just testing stuff?

View 1 Replies

ActionScript 3.0 :: Can't Access Non Local URLs?

Apr 21, 2010

Ok this one has confused me since I touched flash and AS3.0. 90% of the time, when I am trying to access a URL, or connect to anything on the internet through AS3, it doesn't work and tells me that it can't find the URL, or w/e I am trying to access. When I upload it to a server, any server, it works fine, but testing it from within the IDE, it doesn't, maybe 10% of the time it might actually work. I don't get this? How come it can't access these external connections while trying to run it locally?

View 1 Replies

ActionScript 2.0 :: Access Local Webcam Using Flash App?

Oct 3, 2009

I can access local webcam using Flash app but I wanna use as public so anyone can access via local network to be able to open the viewer, but this script only uses a local cam to the computer

localCamera = camera.get ();
camview.attachVideo (localCamera);

Is there a way to get the server ? , to output a file that a viewer can access else where on the LAN?

View 2 Replies

Flash :: FDT Flex And Cannot Access Local File

Jan 23, 2010

I am using FDT for Flex development and when I compile, and it tries to access a flv file, I get the error "cannot access local file". This is obviously a security sandbox thing.Now I tried adding crossdomain.xml to the root and it still makes the same error. I know somehow I need to add to my project use-network=false, but i cant for the life of me work out where the flex compiler additional arguments area is. I know in eclipse how to do it, but with the slightly modified FDT, i havent got a clue

View 1 Replies

Flash :: Air Remote External Swf Can Not Access Local Apk?

May 4, 2011

I'm developing an android file by using flash cs5 air extention. I know the basic crossdomain policy and server to server connections. And I searched many pages but there is no solution about this.

My "container.apk" loads "external.swf" from the server.. And I want to be able to reach the variables and functions in "container.apk" from "external.swf". But I can't reach any function on my container (application file .apk) from my external module swf (remote file).. I mean, I'm trying to reach container.apk's functions from the loaded swf. Like when a button clicked on "external.swf" it should effect a function in "container.apk".

Also here are some error codes that I'm getting ;

[Code]...

View 1 Replies

ActionScript 3.0 :: Allow Access To Both Local And Network Files?

Jul 27, 2009

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.

View 1 Replies

ActionScript 2.0 :: Access Local Files From Website

Oct 25, 2010

without explaining why, I need to run a flash slideshow from a live web page and it is for a photo exibition: The problem is that the slideshow, while running on a love site, must read the image files from the local computer that it is browsed from. If the computer is always the same and the files are in the same directory when it was developed, how would I tell flash that the files are not on the server, but on the local computer?

View 1 Replies

ActionScript 3.0 :: Access Both Network And Local Files?

Jul 13, 2010

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.

View 3 Replies

ActionScript 3.0 :: Flash CS5 / Air 2 - Local File Access

Sep 30, 2010

I have a Flash project that plays FLVs from (http://) sources and it works fine when I publish it as AIR 2. I want to save and access my FLVs locally, but I can't seem to get it to work. I don't know if it is a matter of the correct path syntax, I'm also not sure what an Air app sees as a relative path. This is what it looks like for http:
stream.play("[URL]")
How do I make this local?

View 1 Replies

Flex :: Flash - Browse And Get The Full Path Of A File On Local Machine's File System?

Mar 29, 2010

I am working with Flex, Flash, Action Script and I want to browse the local machine file system using Operating System's file browse window and select a file then i want to get the full path of the selected file. How can I do this?

View 3 Replies

FLVPlayback Skin Doesn't Work On Local Access

Oct 13, 2009

I want to play a video, for it I decided to use a FLVPayback with a skin, and it works very well when I test it in Flash CS4, also when i called it from my server with the "network access" only preference. But when i embeded into a html... it plays the video but the skin does´t shows up.

here is my code:
 
package
{
import fl.video.FLVPlayback;
import flash.display.Sprite;
import flash.display.*;3

[Code].....

View 1 Replies

ActionScript 3.0 :: Access Local SharedObject Set By MOVIE1 By MOVIE2?

Nov 12, 2009

I have a website where under a single domain (and in a single folder on a web server) - two flash movies are stored: MOVIE1.SWF and MOVIE2.SWF Is it possible to access local SharedObject set by MOVIE1 by MOVIE2? What I do:

[code].....

View 3 Replies

Flex 3:: Connect To A MS Access 2007 Local Database

Nov 14, 2011

How do I connect Flex3 to a MS Access 2007 local database? Could you provide some example code for a login page using username and password and validating it?

View 2 Replies

ActionScript 2.0 :: Remote SWFs May Not Access Local Files

Feb 4, 2007

I have this situation (simplified):
MC-A.swf opened from local computer (C:/) and loads MC-B.swf which is hosted on a server.
When MC-B.swf is loaded, it tries to access file called "loader.swf" which is also on local computer (C:/).

When it tries to access the "loader.swf" I get the following error message:
*** Security Sandbox Violation ***
Connection to file:///C|/loading.swf halted - not permitted from [URL]
-- Remote SWFs may not access local files.

I read discussions concerning this issue, and as I understood, I could use:
System.security.allowDomain("[URL]");
to solve this problem, but it didn't work.
I wouldn't like to change the loaded file to load it's resources also from the web, since it can find them on the local machine.

View 4 Replies

ActionScript 3.0 :: Remote SWFs May Not Access Local Files?

Aug 18, 2009

lod.load(new URLRequest(str2));how to unload the lod when second time i cal that function.how to over come this (*** Security Sandbox Violation ***SecurityDomain )

View 1 Replies

ActionScript 3.0 :: Access Local File System With Flex SWF?

Oct 23, 2009

Yes, you can access Local File System in Flex and that too with a standard SWF without resorting to Adobe Air.Check out the link below for full details and the SWF.

View 0 Replies

ActionScript 2.0 :: Changing A GetURL To Access Local Html?

Jan 22, 2011

When I originally made this flash, I created a button to access a web page that I had uploaded to my university server.

Now I'm attempting to compile all my webpages and flash to a CD for portfolio purposes and am having trouble redirecting the button to access the html in an adjacent folder to where the flash is stored.

Here's an example of the original button AS:

on(release){
getURL("TheURL(sorry I can't post links)", "_blank");
}

View 2 Replies

Avoid The Trip To Global Security Panel To Access Local .swf?

Aug 28, 2006

i just want to ask if there's a way to avoid the trip to global security panel to access local .swf?

View 3 Replies

Adobe - Access Local File System From Flex Web Application?

Jan 5, 2011

I'm trying to access local file system from Flex web application. I know it is pretty difficult, but I think there must be a way. Is there a way that Flex app can use AIR components or maybe web application can call some AIR module in order to choose files and upload?

View 2 Replies







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