ActionScript 3.0 :: When Accessing Local File From Loaded Swf

Jul 9, 2009

I have the following problem when loading a swf file. I have content.swf file located at [URL]. The contetn.swf access a file settings.xml located in the same dir. I load it like this:

_settingsURLRequest = new URLRequest( "settings.xml" );
_settingsLoader = new URLLoader();
_settingsLoader.load( _settingsURLRequest );

Now I have another file loader.swf located at another domain [URL]. The loader.swf file loads content.swf but content.swf search for the settings file at domain2 not domain1. I know that I can use absolute address when loading the settings file but I'm loading a lot of files and I prefer another solution. Is there a way to specify that content.swf should always search for settings.xml in its own domain no matter the fact that its being loaded from onother file in onother domain?

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Prevent Loaded Swf File From Accessing Local Network Files

Nov 2, 2009

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.

View 5 Replies

ActionScript 3.0 :: Accessing The Url From Which A Swf File Has Been Loaded?

Jan 6, 2009

finding the url of the swf filefrom which it has been loaded? The purpose of the url is, I amloading some flv files using relative path. I just want to achievethe same by appending the relative path to the parent swf url fromwhere the parent was loaded. I am a newbie to AS3

View 5 Replies

Flash - Accessing A Button Inside A Loaded Swf File?

Dec 28, 2011

I am trying to access a button inside an external swf file that I loaded. Problem is every time I try to access this button I get an error saying that it's null!

Here is my code:

public class DocumentClass extends Sprite
{
public var loader:Loader;
public var swfFile:URLRequest;

[Code].....

Now this should work, code-wise I think its correct. The problem is that loader cant find the required button. There is indeed a button in the loaded movieClip with an instance name of "button", I double checked that.

[URL] basically i was just a layer too high and this is why i couldn't access anything..

View 1 Replies

Flash :: Accessing CHILD In External Loaded Swf File

Jan 7, 2012

How do I get to the MovieClips within an externally loaded Movie Clip. Lets say I have a movie Called ONE in the swf I just loaded. How can I work with it alpha, position and other properties of the children of this clip? CODE IN MAIN TIMLINE:

[Code]...

Now its loaded I want to change the postino of the clip called ONE in the movie LoadedMC I just created.

View 1 Replies

ActionScript 3.0 :: Accessing A Movieclip Of Dynamically Loaded Swf File

May 16, 2009

in (swfA.fla) I have this code in frame1

var module1:Loader = new Loader();
var admin = new MovieClip();
addChild(admin);

[Code]....

(my thought here is that 'admin' contains swfB.swf?) - this would seem very simple... but it...

...does not work and gives me this [seriously unhelpful] error:

TypeError: Error #1010: A term is undefined and has no properties.
at swfA_fla::MainTimeline/frame1()

View 7 Replies

ActionScript 2.0 :: Launching A Local Html File From Local Swf?

Jan 16, 2007

i am having a problem launching a local html file from my swf. i have a button called print that when clicked it is supposed to open the local html file and print out the content. this is the code i used on the button

on (release){
getURL("folder/folder/file.htm","_self");
}

[code].....

View 4 Replies

ActionScript 3.0 :: Accessing Web-locations From Local Swf Or Exe

Sep 20, 2010

I want to make such flash file, which would contact web content without asking an user to add the file in the allow list on adobe web-page, is it possible to make it without help of other programing languages?

View 4 Replies

ActionScript 3.0 :: Accessing Local Variable (Never Declared Before)

Apr 24, 2009

I work with FlashDevelop, Flex SDK and FP10 debug. I am able to access a local variable (xcorner) which is never declared before, at the condition that it must be declared after... in an "if" for instance. If I remove the declaration of xcorner, within the if, errors occur at compilation, but otherwise it works.

PHP Code:
public function pushShape2Pool(name:String, sh:Shape, rotAngle:Number = 0):int{
[...]
// xcorner is NEVER declared before !!!
coordSprites[0] = new Rectangle(xcorner, 0, globalBmp.width, globalBmp.height);
trace("xcorner=" + xcorner); // display 0
xcorner += globalBmp.width;
[Code] .....

View 7 Replies

ActionScript 3.0 :: Accessing Stage Items, Through A SWF File Which Is Loaded Inside The Stage

May 14, 2011

- I have A.fla.

-  A.fla includes buttons, movie clips and also B.swf is loaded in A.fla using a LOADER

- i want to access elements in A.fla, from the actionscript codes inside B.fla to modify those movie clips and buttons based on actions going on in B.swf
 
for instance, lets say there is a button X in A.fla, and there is a button Y in B.fla,  B.swf is loaded into A.fla, and I want the button Y to erase button X when clicked.
 
general question:  accessing elements in a stage, through a SWF file loaded into that stage.

View 2 Replies

Actionscript 3 :: Accessing A Clip Inside Another Clip In A Loaded SWF-File?

Mar 1, 2010

I'm writing a card game in AS3. The artist I'm working with has produced (in Flash CS4) a single swf-file containing all the card graphics and animations. The structure of the fla working file looks something like this:

- Scene
- CardGraphics (Movie Clip)
- CardFront
- CardBack
- CardValueImage (Movie Clip)

In the program I create 52 instances of my Card class, each having a MovieClip instance created from the loaded swf. The idea is to set the frame of the CardValueImage MovieClip to correspond to the Card instance's suit and rank member variables. However, I can't figure out how I access CardValueImage and call gotoAndStop (or whatever method I will need to call).

[Code]...

View 2 Replies

ActionScript 3.0 :: Accessing Local SharedObject(stored In HDD) From Website?

Jul 25, 2009

Is there a way that i can access Local SharedObject using a swf from the net.

For example, i have a .swf that creates SharedObject running locally on my desktop computer.. But when i'm somewhere else, i need to access some of the shared objects in my desktop, is that possible?

View 4 Replies

Flex :: Accessing Video Content Over Local Network?

Jun 17, 2011

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.

View 1 Replies

IDE :: Accessing Local Shared Object From Diff SWFs

Jan 19, 2009

I am facing a problem in accessing Local shared object from 2 diff. swfs. Let me explain the scenario clearly.I am developing a radio widget (in maindomain.com for ex)which has a button to open a html page (placed in contentserver.com) as a popup with specific wt and ht. The html page loads the same SWF file of radio widget from "maindomain.com", means whatever changes we do for the SWF in maindomain will be reflected automatically in the popup also.Here where the problem is:

1. Say I am playing radio station "A" in main window and added this station to favourite list (which is done by storing in Share object). So when i open the popup its reflect there.

2. Now when i change radio station "A" to "B" in the popup and added "B" to favourites and closed the popup.

3. When I refresh the main window, I can get both "A" and "B" in fav, as expected.

4. But if without refreshing in main window when I changed to some new station "C" and then open the popup, it has got only radio station "A" in the fav list.

I am pretty sure this is because of Sharedobject.flush(). The thing I am wondering is, why the station "B" which is also pushed to sharedobject when added to favourite is getting deleted when I flush() the SO.?I googled many forums but not satisfied solution for this. Even I tried to get the Sharedobject.getLocal("SO","/") every time before using data in it. but no use.Is it a Flash limitation accessing LSO from diff SWF?

View 4 Replies

ActionScript :: Annonymous Functions Accessing Local Variables [Flex 3.5]

Jun 8, 2010

I am having a situation with my actionscript/flex front end.

[Code]...

I am expecting to have 3 Alert windows containing A, B and C. But the actual result is 3 alert windows all showing C

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

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

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

ActionScript 3.0 :: Let My Local Running Swf-file Access A Xml-file That Is On A Server?

Mar 9, 2011

How to let my local running swf-file access a xml-file that is on a server?

I have been to the "Global Security Settings panel" but dont really understand.

View 2 Replies

ActionScript 3.0 :: Loaded Swf Doesn't Respect Local Space

May 7, 2010

I made a particle generator that spawns bubbles... the particle spawner is a movieclip and all particles are children to it... this spawner is then loaded to stage with some more instances of it and they're arranged so that they produce enough bubbles to cover pretty much the whole screen...

So far so good... the trouble is that this project is meant to be projected into a hologram, and needs to be positioned, rotated and distorted to fit the irregular projection space...

My idea is to just leave the particle generating swf as it is and load it into another swf, then do all the positioning and rotationing as if it were a movieclip... My knowledge of Flash and the way movieclips have they own local spaces tells me that this has no reason to not work... but apparently, loaded swf's have a mind of their own...

I'm loading the swf using the UILoader component, which seemed to me the easiest way to get it working, since it doesn't need to be dynamic or anything... I just want to position it once, save it at that, and leave it be...

the trouble is that once loaded, the particle generating swf spawns it's emmiters (there are 5) in relation to stage space, and not loader space... so it doesn't respect it's boundaries or orientation...

I've tried all possible settings of the UILoader parameters... none seem to work with an swf that is creating movieclips at runtime...

Does anyone know why this is? I'm probably missing something stupid here... I'm feeling rather dumb today... yesterday I created the whole particle emmiter and bubble physics in 2 hours, but today it seems my head doesn't want to go and I'm stuck with this rather silly problem...

I tried placing the UILoader into another movieclip, so that any loaded content would be inside that movieclip's space, but it just doesn't respect any orientation... btw, I'm not rotating it by code... yet... I was trying to get it working using the editor, which would indeed be much faster and simpler.

View 5 Replies

ActionScript 2.0 :: Detect When Flash Is Loaded From Local Drive?

Feb 10, 2012

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?

View 2 Replies

ActionScript 3.0 :: Local Connection To Swf Loaded On Native Window?

Aug 7, 2011

I have 2 swfs loaded that use a local connection to communicate, they work fine when loaded on the same window but when I load them on separate windows it gives me the following error.

ActionScript Code:
Main Thread (Suspended: SecurityError: Error #2070: Security sandbox violation: caller file:///C:%5CUsers%5CSiggy2xc%5CAdobe%20Flash%20Builder%204.5%5CMass%20Media%20CG%5Cbin-debug%5Cswf%5Canimation%5CTest.swfcontrol cannot access Stage owned by app:/Mass_Media_CG.swf.)

View 0 Replies

ActionScript 3.0 :: Assigning The Value Of A Property In An Externally Loaded SWF To A Local Var?

Mar 13, 2009

A have a external SWF file that contains an instance of an object that will be used across multiple projects. It's accessible as a public property of the external SWF.When I load the external SWF file using the Loader class everything comes in fine but when I try to assign the value of that property, which traces out as an instance of the correct object, to a local variable the local variable is always null.Below is a dumbed down sample of what I'm trying to accomplish:# Object Class

Code:
package com.derrickcurry
{

[code].....

View 1 Replies

ActionScript 2.0 :: Detect When Flash Is Loaded From A Local Drive?

Feb 10, 2012

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?

View 1 Replies

ActionScript 3.0 :: Loaded Local Video Stops Play After A Few Seconds?

May 16, 2011

when I use the following function in my doc class to launch a local video, the video "freezes" after a few seconds. This happens no matter what video I am trying to play.

Code:
private function startVideo(e:MouseEvent):void
{

[code].....

View 7 Replies

ActionScript 3.0 :: Accessing A Loaded Swf?

Jun 1, 2011

I'm using this code to bring in another swf into a movieClip called "movieLoader":
 
var myLoader:Loader = new Loader();
movieLoader.addChild(myLoader);
var urlMovie:URLRequest = new URLRequest("movie1.swf");
myLoader.load(urlMovie);
 
The movie loads just fine, but how do I access it?
 
I tried:trace(movieLoader.totalFrames);
 
and it just gave me "1".  I know the movieclip has more than 1 frame.What do I do to access the swf called "movie1.swf" I just brought into that movieClip?

View 4 Replies

AS3 :: Accessing Methods In Loaded Swf

May 20, 2011

I'm loading an external AS3 SWF using the Loader class but i need to access a method inside the loaded SWF. how can i do this?

View 1 Replies

ActionScript 3.0 :: Accessing Another Loaded SWF?

Oct 13, 2010

So I want to access another loaded SWF. How can I have ChildA talk to Child B? All are external SWFs.

[Code]...

View 1 Replies

ActionScript 2.0 :: Externally Loaded Sound Works On Local Machine - But Not Online

Sep 19, 2006

I'm using loadSound to load in external MP3 files and they load and sound great on the local machine but don't work when I upload the files to the web. I'm pretty stumped. The MP3 files are only like 10k and 60k so it can't be a size issue (I'm on a T1 line here at work too). Here is the site: [URL] Basically when you walk close to the fire you should hear the fire crackling and it will get louder as you get even closer. Everything works on my PC, just not online. Here's the AS code for the fire:

[Code]....

View 3 Replies

ActionScript 3.0 :: Accessing Loaded External Swf?

Mar 30, 2009

I am using a zoom component which i purchased recently to load different external swfs on different button clicks. But instead of loading separate external swfs I would like to load a single swf and go to frame labels - "one", "two", etc. - I've been reading about casting the external swf as a movie clip, but I am confused how this would work with the code I have at the moment.

var image:String="introlocal.swf";
function loadContent () {
var myLoader:Loader = new Loader();

[code].....

View 1 Replies







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