ActionScript 3.0 :: Swf From A Server Call Json Functions On My Local Drive?
May 9, 2011
I have a html page on my c drive (it will not be hosted online, ever) which embeds a swf from a server, with swfObject, allowScripAccess is true. I need that swf to invoke some calls to the html's js funcitons. I get an error stating [code]...
I know i can solve it by going to settings mamager and adding my C to my "trusted sites".... I, however, need a different solution, that does not involve tweeking settings manager. Tried adding a crossdomain to the root of the directory on my comp, with no luck - im assuming for crossdomain to work it must be hosted on a server - and my local directory is not a server, and cannot be one ( no localhost is allowed as per requirement).
I am trying to create Flash video for usb drives sold to customers with their pictures on it. After the video plays, can I have a link to a local folder, IE: named YOUR_IMAGES on the drive, and have that folder open on their machine when clicked? Or is there to many variables with what what the drive letter name that will be assigned on customers machines? So there will be the same .SWF on every drive sold, then a folder named the same thing with the customer pics on it.
I am wondering if I can somehow combine these two functions into one server call. The problem I have is that I have 2 different data types that I need to send. One as a ByteArray and one via URLVariables.
Code:
// this works on it's own function callServer():void { var urlRequest:URLRequest = new URLRequest("echo.php");[code]..././.
In all previous versions of flash I have been able to use "geturl" on a button and pull up a pdf in a local directory on my computer. Now with CS5, the same code pulls up a webpage and actually tries to go to a url. Is there a new way in CS5 to open a pdf on my local drive?
its possible to load an image from a local drive and how is it done? Coz I've been trying to load an image by using this "file:///C|" but its not loading when I'm trying to access it in the network. Is there any way to load it locally?My goal is to run the swf in the network and load the images from the clients drive.
Is there a script that checks if the flash is loaded from a local drive?Example: Keric opens a flash file. The script then checks if the file is being played from a local drive. If it's not, ads will be displayed.Something like a domain lock. Uhm, local drive lock?
I am using basic addEventListeners and functions to create a basic navigation for my homepage... when I test the movie on my local drive it fuctions perfectly, but when I upload it to the www, the movie behaves different... All the buttons must be clicked twice to function properly.... each button uses the UI Loader to load the appropriate .swf clip, but on the first load the movies dont function properly, when the same button is clicked again and the movie is loaded again, it works fine. I noticed cause I have a preloader for every movie clip that loads and on the first click it doesnt work, on second click it works, and because it function fine on my local drive I'm lost as to what I can do to fix the problem, or what the problem is.
Does anyone here have an idea on how to create a folder on your local hard drive via flash AS3, the name of the folder will depend on what you enter on the textfield in the .swf file.
I'm looking to create a solution that will enable me to have a folder of AVI files on a USB drive, packaged along with a custom designed player (probably built in Flash). I would like to creare the packaged flash file in a way that will autorun on inserting the drive if at all possible. The solution will need to be platform agnostic (hence my thinking that Flash would be the best bet). Has anyone come across a tutorial for achieving anything even similar to the above?
var mic:Microphone = Microphone.getMicrophone(); mic.setUseEchoSuppression(true); mic.setLoopBack(true);
when I browse thru adobe documentation for microphone access. But I could not find a way to record the sound and save it in the local drive.How to store the sound in local drive???
The user loads the page HTMl file .swf. By clicking on button_mc the user can select from your computer (local disk) image file to upload not on the server and temporarily - to flash - the file.
[code]....
Below given code works only if the image file .swf are in the same directory (folder).I know the file name, but I can not find the full local path to his computer to the selected file.
[code]....
How do I get my site you can download at home in my swf file to a photo to her dalsche work?
We would like to build a flash video player into our corporate intranet site, currently we are evaluating JW Player and have come across and issue accessing the FLV files stored on a mirrored share drive that all users have access to on the local intranet.From what I can tell the Adobe flash plugin will not allow a SWF file hosted 'online' (intranet) to access a shared directory that the user has access to. Is there any way around this?
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.
So I've tried to build a small utility to view the contents of a JSON file in an easy-to-understand manner (for non-tech people).I have Googled far and wide, high and low, but every example that shows how to consume a JSON file in Flash Builder uses the HTTP service, pointing to a file on the web.Here I am, sitting in front of my MacBook, wondering why I can't make this work. In the documentation I've found (sort of relating to this issue), they always show Windows examples, and they seem to work fine:That doesn't work. I've tried some "resolve to path" syntax, but the HTTP service does not seem to allow for anything but file paths in quotes.
I'm developing a game add-on/plugin which replaces a built in feature of an online game. The game loads an .swf therefore, my solution also has to be an swf for it to work 'in-game'.
I would like to be able to have the user press a button in the custom .swf I am making - and this would open an external application (amongst other things). I.e. if there was a button that said Notepad, it would open Notepad.exe on the machine.
My initial thinking was that i could have a XML Socket server 'daemon' runnning (c#) , which i could connect to with flash - however, as both the swf and the daemon are local, flash complained and gave this error: "Error #2010: Local-with-filesystem SWF files are not permitted to use sockets."
The only way i know to fix this - is to change the security settings of flash - not very user friendly!
So! Any thoughts on how I could otherwise go about this? I was thinking a custom http server could do the trick (connected with URLRequest) although i'm not too sure.
Is it possible to call a web service from within Flash (using AS3)? Or is the best idea to put the flash movieclip in a Flex container and use the Flex Libraries?
To be clear, when I say within Flash, I mean within the Flash CS4, AS3 programming environment.
I need to call a function in JS that's expecting a JSON object. Can I do this from External Interface? The company's example (after the include file url) in HTML looks like this:
//there's an js include URL earlier// Shopwithme.Initialize({ "id":"prod1234",
[code]...
But, I need to dictate these vars through Flash. How do I call this function using External Interface?This is my EI code, but I'm obviously off base, since it's not working:
I've tested the videos off of my harddrive, and they work great using a skin that flash has.But when I uploaded it, and test it on my server, nothing loads.
I am creating an AIR application using flex3 and actionscript3. there, i need to display dir content of cd drive/usb drive entered by user. how can i get cd/dvd drive name by actionscript3
I'm trying to use Adobe Flash Media Server 3.5.3 on a WIndows 2008 Standard SP 2 with a network drive mapped as Z, pointing to a samba share.
I keep getting a Connection error while trying to view a rtmp file. I'm using the default example from the installation directory. I made the following changes in the files:
fms.ini
VOD_COMMON_DIR = z:vodVOD_DIR = z:vod
the z:vod directory is shared ad EVERYONE full control. (I can easily read and write on z:)
I've mapped the disk using Putty and port tunneling over ssh. I've tunneled port 139, 445 and 1935.
I am new at ActionScript. I'm trying to use it with Flare visualization package, but truth is, I don't know what is due to my ignorance of Flare or my ignorance of ActionScript. I am trying to use JSON to get some data from my server. Near as I can tell the data are arriving properly at my ActionScript, but then I get lost.
public function buildGraph(num:int) : Data { var dataata = new Data(); var nodes:Array = new Array(num);
[code]....
So, it must have gotten something from my server. What I want is to get the nodes from the nodes list and edges from the edges list, which is also in the json package. The server (running Python / TurboGears 2.0) returns
return dict(nodes = nodeList, edges=edgeList)
nodeList, in turn, is a list of dictionaries of the form: dict(id="node"+"%03d" % n).I tried ds.nodes, ds.nodes.data, ds.nodes.valueOf, etc. What am I missing?
connect to online web service to retrieve data using as2. while I am able to connect and send data successfully, I don't see the response. This is what I am trying to do:
It works when I test i Flash - but in Browser it doesn't work.
Is there something I have to change before publishing?
ActionScript Code: import com.adobe.serialization.json.JSON /*Path to the JSON class (in JSON.as). NOTE: make sure to keep all the classes in the original json folder together and that at the very beginning of each class file in the json folder, the file path after the word 'package' accurately reflects that path to the FOLDER in which all the classes are located. E.g. package [URL]
/*Create the objects you need*/ var loader:URLLoader = new URLLoader() ; var request:URLRequest = new URLRequest() ; /*Connect to and load the data within the numbers.php file*/
sendInfo = new LoadVars(); sendInfo.addRequestHeader("User-Agent", "myagent"); sendInfo.onLoad = function() { trace(sendInfo.loaded): }; sendInfo.load("url");//for getting JSON data
My Result is false and the firefox browser is still loading data from server. how to use useragent in actionscript2 and also how to get json data. I don't know is it json data problem or another