ActionScript 3.0 :: Loading Local Files With Query Strings

Sep 14, 2009

I have a strange problem loading external assets from local files with Loader() Class in AS3. If i use query string in the file name, the asset don't loads.

[Code].....

if i dont use the '?id=33' it works. More strange... in Flex with SWFLoader it works

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Using FlashVars And Query Strings?

Feb 3, 2009

Basically, I have a URL to a SWF, but I need to get some info to the SWF on load. So the FlashVars seemed like a perfect fit. the link+query string -> HTML page using SWFObject 2.x to embed the SWF ->JavaScript to use the "document.location.search" in order to get the query string.

Here's my HTML code:

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>

[code]...

When I leave the alert on in the HTML page, it displays the query string of

"grade=0&workmat=1&manipulative=2"

View 5 Replies

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

ActionScript 2.0 :: Building GetURL Query Strings With Variables

Nov 23, 2004

I have a querystring passing a var to my .swf. This var is getting into the movie fine and I can output it in a text box, but I'm having problems "rebuilding it" into my new getUrl. Here's what I have:
Code:
on (release) {
getURL("index.cfm?searchtype=" & _root.searchtype & "");
}

What I'm looking to see interpreted by the browser is:
Code:
on (release) {
getURL("index.cfm?searchtype=OH");
}
(where the value of _root.searchtype is "OH"). [URL]

View 2 Replies

ActionScript 3.0 :: Loading Local HTML Files Into A DIV?

Jun 28, 2011

I'm creating a portfolio sitethat has an AS3 Flash navigation in one div (#main-left) and what I'd like it to do is load local .html files in the div next to it (#main-right). I had gotten it working by placing an iframe inside the right div, and calling it with:

ActionScript Code:
function contactURL(e:MouseEvent):void{
e.currentTarget.gotoAndPlay("hit");

[code]....

View 2 Replies

ActionScript 2.0 :: Browsing And Loading Files From Local Disk?

Aug 20, 2010

Im not sure if this is possible in AS2 but i will ask anyway! Would it be possible to have a standalone SWF which gives the user the ability to browse their computer files and then load a picture for example? I know this can be done in AIR but im restricted to AS2 only!

View 1 Replies

ActionScript 3.0 :: Progress Display For Loading Big Local Files

May 9, 2011

i am currently building an application ( projektor) which loads big local files (no webserver) for some reason the flash player freezes until the whole file is loaded. i cannot display the load progress. the same code works fine when used with streaming from a server.

View 2 Replies

ActionScript 3.0 :: Flash Loading Remote Files From Local Swf?

Nov 8, 2011

I have a problem when i try to access the internet from a swf that is run localy.I want to load other swf files from diffrent domains into my main file wich works fine when the swf is on some domain but when i download the file and run it localy it doesn't work.

Can i change the sandbox type from actionscript? Mochi Media does it after enctypting your swf but i don't know how.

View 2 Replies

ActionScript 3.0 :: FLVPlayback Source With Query Strings (parameters) Doesn't Load

Aug 31, 2010

I'm currently trying to use the FLVPlayback component and pass a source FLV that's living on a cloudfront webserver. The problem is that the cloudfront requires authentication in the form of query strings in the source FLV. For example:[code]It adds on "&FLVPlaybackVersion= 2.1" to the end.I saw a different article that said I should add a dummy variable at the end like "&dummy=.flv" because I was told that Flash is basically looking for an .flv extension at the end and you can trick it, but it doesn't work because they add on additional code.

View 9 Replies

ActionScript 2.0 :: LoadMovie With Query String On Local Machine?

Nov 27, 2007

I've been given a bit of a dog to work on. I'm upgrading a flash presentation that runs via an xml feed. I've added several dynamic flash graph generators external swfs through this data feed but can't seem to pass a query string to the flash presentation via this xml feed. This query string provides an alternate XML datasource for the graph generator.s

I would really like to be able to pass this query string as the current flash graph generators are running off a hardcoded xml filename and I would like to offer some flexibility. I've investigated further and the main presentation loads these extra "slides" with the loadMovie AS which should accept query strings but NOT locally. Is there a workaround to make loadMovie work with query strings locally? I can't run the presenation on a server!!

For example. This XML works locally with the flash presentation;

<slide>
<name>Chart 1</name>
<bullet>chart01.swf</bullet>
</slide>

[Code].....

View 1 Replies

Flex - Security Restriction - Save The Results Of A Database Query To A Local File?

Jan 2, 2012

I'm having some trouble getting around a security restriction of flex. Saving a file is apparently an action that can only be invoked upon user interaction. The problem is that after my user clicks on the save button, I need to perform a database query to get the data for the file I want to save.

Because Flex works asynchronous, I have to make the database call and then catch the ResultEvent in a different function. In that function, I no longer have the user's mouseclick event. How am I then supposed to save this file?

[Code]...

View 1 Replies

ActionScript 3.0 :: Uploading Local Files Without Requiring User To Select Files?

Feb 3, 2009

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

View 4 Replies

ActionScript 2.0 :: [FMX] Loading TXT And Strings?

Jun 26, 2003

i have a .txt full of words (strings) devided by lines and separated with ; and i want to be able to load 1 random line and the first string of it..xALI;DALI;IDEAL;DELIRAREDIAL;REPELIDAAMO;MATO;MORTA;MOSTRA;MAESTRO;BATERMOSi want to be able to load "ALI" for example. and then load DALI etc etci used loadvariablesnum to load the text, but maybe that shouldn't be the best option..

View 7 Replies

ActionScript 3.0 :: Loading XML From Exe File Query

Apr 11, 2011

I have a Flash movie exported as an exe file, that loads information from an XML file situated on a server, like so:

var urlLoader:URLLoader = new URLLoader();
var urlReq:URLRequest = new URLRequest("http://server.mydomain.co.uk/info.xml");
urlLoader.addEventListener(Event.COMPLETE, loadXML);
urlLoader.load(urlReq);

I'm testing the exe from my desktop and it's working fine, calling the URLs in my default browser. I would like to ask, will the exe work from any machine with internet access? Or are there likely to be problematic security issues? I haven't had to change any security settings for the exe to work on my PC.

I just want to make sure that there are not likely to be any problems in my particular situation (zero margin for error with these clients!).

View 1 Replies

ActionScript 3.0 :: Loading XML From Exe File Query?

Apr 11, 2011

I have a Flash movie exported as an exe file, that loads information from an XML file situated on a server, like so:

var urlLoader:URLLoader = new URLLoader();
var urlReq:URLRequest = new URLRequest("http://server.mydomain.co.uk/info.xml");
urlLoader.addEventListener(Event.COMPLETE, loadXML);
urlLoader.load(urlReq);

I'm testing the exe from my desktop and it's working fine, calling the URLs in my default browser. I would like to ask, will the exe work from any machine with internet access? Or are there likely to be problematic security issues? I haven't had to change any security settings for the exe to work on my PC.

View 1 Replies

ActionScript 3.0 :: Loader Loading Request With Query String?

Nov 17, 2007

I need to get Zoomify to work in my AS3 application, the problem is, it's an AS2 component. so i have a swf compiled in AS2. lets call it "map.swf"so since i can't access any actions or scripts inside map.swf from my AS3 project, i'll have to pass some variables to it via query string... "map.swf?foo=bar"it works to just navigate to it from a browser using "map.swf?foo=bar".and it works to load map.swf using Loader.load(new URLRequest());

here's my code:
Code:
var request:URLRequest = new URLRequest("map.swf");

[code]......

View 3 Replies

ActionScript 3.0 :: Loading An Image As Variable From Query String

Oct 26, 2010

I'd like to dynamically load a image into my script. Ie/ myMovie.swf?image=myimage.jpg If no image gets passed - the script should use the default.jpg instead and load normally. This is what I've tried so far....

var CoverName = stage.loaderInfo.parameters["CoverName"];
if (CoverName == null) {
CoverName = "images/default.png";
}

View 0 Replies

Query - Run A Sqlite Query In Flex To Count The Total Number Of Records?

Apr 16, 2010

I'm trying to run a sqlite query in flex to count the total number of records I believe its working fine but I just can't figure out how to display the results - all I get back is [object Object].

private function overviewOne():void{
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConn;
stmt.text = "SELECT COUNT(user_id) FROM tbl_user WHERE status_status ='Away'";

[code]....

So how do I make a reference to the COUNT(user_id)?

(flash.data::SQLResult)#0
complete = true
data = (Array)#1

[code]....

View 1 Replies

ActionScript 3.0 :: Push Multiple Strings Into An Array, And Some Of The Strings Are The Same?

Aug 24, 2009

I work on AS3 one week, and then take a break for a few weeks, then work on it a day, take a break, etc.. So I forget some of the basics, and need refreshers. I think I need to stop taking breaks.

Problem: I push multiple strings into an array, and some of the strings are the same.

Code:
var myArray = new Array();
myArray.push (Snivvle);
myArray.push (Kirupa);
myArray.push (Snivvle);

I want to find out which element positions "Snivvle" hogs up. We can see that it would be using element 0 and 2, and if we do an "indexOf" we would only get to see element 0, and doing a "lastIndexOf" we would only see element 2. How do I find out ALL of the element positions "Snivvle" is located in, so that it returns: element 0, element 2.

View 2 Replies

ActionScript 3.0 :: Downloading Local Files?

Oct 1, 2008

I 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 Replies

Getting Error Opening URL-local Files-mac

Jun 8, 2010

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

ActionScript 3.0 :: Lik The Images And Swf To Local Files?

Sep 24, 2010

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

View 1 Replies

ActionScript 2.0 :: How To Load Local Files

Apr 28, 2004

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

Professional :: Flash Files Don't Work On Local Pc?

Oct 14, 2009

i have the problem of local files of flash not working in any browser. to explain further i have html pages with headers in flash in my hard disk with links of the connecting pages. when i open such pages in any browser the links dont work. the page just stays as it is. when i click on the links only the state of the rollover changes when clicked on a link. the links when clicked dont go to the linked page. but when i upload these files to the server, they open and work perfectly in any browser.

View 8 Replies

ActionScript 3.0 :: Opening Local Files Using A URLRequest?

Nov 16, 2009

is it possible to open a file from say C drive when your flash file is in C:somefolder?

View 1 Replies

Professional :: Standalone App (AIR) For Playing Local FLV Files?

Apr 29, 2011

Can someone point me to a desktop app (Windows and Mac) that can play local FLV files?

View 4 Replies

Flex :: VideoDisplay Cannot Load Local Flv Files?

Jun 28, 2010

I have noticed that I have to put flv files in the same or sub-directories of the application file, for example myproject/bin-debug/flvs/1.flv, and use videodisplay.source="flvs/1.flv" to load.

If I put it in myproject/flvs/1.flv, I cannot load it in VideoDisplay, using videodisplay.source="../flvs/1.flv". However the metadata (duration for example) is retrieved, but play() cannot start it.

View 1 Replies

Release - Flex Build Use Local Files?

May 26, 2011

I have a very stupid problem. I'm using Flash Builder (Flex) 4. My application displays a video using VideoDisplay component and some images. The video filename is always named video.mp4 and the images are inside a folder called "real/". The video file and the real folder are in the SAME location of the .swf built.

The video source in the code is set like this: videoDisplay.source = 'video.mp4';

and the images, loaded dynamically, are like:

img.source = 'real/' + imageFilename;

[Code]...

View 1 Replies

Flash :: Player 11 - Can't Play Local Swf Files?

Nov 30, 2011

in older versions of flash player if I opened a swf file in a web page locally it would bring up a security settings box where I could allow files to play locally - but this doesn't seem to happen in flash player 11 - how do I enable my swfs to play locally?

View 3 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







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