Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




LoadVariables From Remote Mc Loaded Into Local Mc



I am aware that you can't call a script on a remote server with loadVariables but does this apply to this scenario too:

In domainA.com I have an empty swf that does nothing else than using the loadMovie to load a swf located in domainB.com.

This works fine.
In the swf located in domainB.com I have to actions - a getURL and a loadVariables.
Both of these actions use a relative URL.

When the getURL action is executed, it displays the webpage located in domainA.com, because allthough the swf is located in domainB.com, the swf is loaded into a "parent" swf in domainA.com, so everything works as intended. Cool...

The problem arises when trying to call the loadVariables action. There is no response to this action. Is the swf in domainB.com still considered a "remote" movie, allthough it is now loaded into, and becoming a "child" of an swf in domainA.com?

Also, I have included the System.security.allowDomian("doaminA.com") and vice versa in both files. I thought this would do the trick?!?

I'm using Flash MX and it is a must the the movies can be viewed from FlashPlayer 6.

Hope someone knows a way to work around this...

-Henrik



FlashKit > Flash Help > Flash ActionScript
Posted on: 06-20-2004, 11:40 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

LoadVariables Works Local But Not Remote
Hi All,

I've got a strange little problem.

I'm using a simple perl sendmail script to send some input fields from flash via email. When the button is released i execute the following actionscript:

on (release) {
loadVariables("http://www.sentai.com/cgi-bin/mailit.cgi", "", "POST");
gotoAndPlay("ROI");
}

Testing locally this works perfectlly sending me a mail with the information and going to the frame ROI.

When i load it up to the server It goes to the frame ROI, but does not execute the perl script to send me the mail.

I've also tried the following (which don't work):

loadVariablesNum("http://www.sentai.com/cgi-bin/mailit.cgi", "", "POST");

loadVariables("http://www.sentai.com/cgi-bin/mailit.cgi", "", "GET");

loadVariablesNum("http://www.sentai.com/cgi-bin/mailit.cgi", "", "GET");

Has anyone run into this before? Let me know if you have any ideas that i can try.

Thanks for the help!!

Loaded Txt File Works On Local But Not On Remote
I was wondering if anyone has experienced the same problem?

I have a txt file that loads data into my flash scene and it works fine on my desktop but refuses to work on a server (MS Windows Server 2003). Does anyone know why this would happen. It doesn't make any sense to me!

Remote Actionscript Issues - Local Vs Remote
i made web banners with the intent that the shell being the initial swf, could pull an external swf file from a remote site.

view here:

http://www.anthonythomas.com/duplicolorespn/

the main .swf file has to be under 30k, which it is. now the other .swf files load when you rollover the buttons. this method fulfills the 30k requirement on the advertisers side - also allows the creative to have higher res images/swf files hosted on our site/side.

in testing it locally, it all works great...

but when i moved the .swf file to

http://www.justinhale.com/test/

to test it -

the files hang up when you mouse over the buttons - is there a chance you could check out my source?

here:

http://www.justinhale.com/duplicolorbanner.fla

i'd really appreciate any help this forum could offer.

i checked out the security settings. security.allowDomain,
not sure if i'm using it correctly?

thank you,

jh.

Local SWF, Remote FLV
nevermind





























Edited: 11/17/2006 at 06:49:27 PM by barnarycode

Local SWF, Remote FLV
nevermind





























Edited: 11/17/2006 at 06:49:44 PM by barnarycode

Remote Fla Ref Local XML Without Js
Hi, I have an swf file the gets content and formatting from an XML file in the same directory.

I want to start reusing this swf file for several different applications, getting different content and formatting for each 'instance' of the swf file.

The aim, therefore, is to store the swf in one place and have it look for an XML file in the same directory as the HTML page which contains the OBJECT tag of the swf file.

The Movieclip._url property returns the URL of the original swf on the server.

Q: is there are way to retrieve the URL of the swf instance without resorting to javascript? There are application architecture reasons why I would prefer not to use javascript.

Thanks for any help.

'loadVariables' And Updating Remote Files
How can I use loadVariables to update(change) a var in a remote .txt file? I can import the var just fine but after I change it's value in Flash I have to overwrite the old value with the new.

LoadVariables Working From Remote Source -but I Don't Want It To
People usually ask the opposite question, which is: "How do I get loadvariables to work with files on other servers?"

Well, I want to prevent that. I have read:
"When playing a Flash document in a Web browser, you can load data into the document only from a file that is on a server in the same subdomain. This prevents Flash documents from being able to download information from other people's servers. "

I was glad to hear this. But I tried running a .swf file from my computer, which access a php file from my website and returns a variable. It worked. I looked into making a crossdomain.xml file(although I didn't know why I had to create one, if access should be denied anyways). I made the file with no access, hoping that might work. I could still get the variable to return to my computer.

How do I prevent that?
Here's an example of why I ask: Say you have a game on your site, which submits the user's score into a database at the end. The user could save the .swf file from their cache, decompile it, and edit the actionscript to submit whatever score they want.

What am I doing wrong?

HELP: Loading Remote Txt From A Local Swf
Hello
I'm trying to load some remote text to my flash newsticker locally. This SWF file will be imported to my Director project
I've been trying to get the txt file from my website but the swf newsticker won't get it.
Got the news ticker from:
http://www.flashkit.com/movies/Scrip...0590/index.php

This newsticker has 2 frames with actionscript inside and a movie where the txt should scroll.
The code:
1st frame:

Code:
loadVariables("texto.txt", 0);
newsText.autosize = "left";
var maxheight = newsText._height;
var maxpos = 0-maxheight;
gotoAndStop(2);




2nd frame:

Code:
if (newsText._y < maxpos){
newsText._y = 20;
}
newsText._y -= 0.21;
gotoAndPlay(2);





The variable text file (texto.txt) is at http://www.cinemainvisivel.org/PHP/texto.txt

I reed this:
http://www.moock.org/asdg/technotes/crossDomainLoad/
http://www.moock.org/asdg/technotes/crossDomainPolicyFiles/

and this:
http://www.macromedia.com/cfusion/kn...fm?id=tn_16520

But didn't get how to do it.
Tryed the Server-side Proxy method but seems it won't work, or I'm missing something. The Shim SWF method is to complicated...
There's no pragmatic example.

Can anyone help me with this issue?
I would need a more explicit help.

Thank you very much for your time and care.

Best regards.

TV And Remote Local Connection
Hi, the best way to explain what I want to do is have a flash movie that is a remote control and control another flash movie that is a tv and be able to change the tv by pushing buttons. I need to know what this will look like with a local connection. I've tried many times and asked on here months ago but still no success.

Thanks for any help.

Detecting Local Or Remote
Hi folks - new to the board, been digging around here for a while. Its nice to have an alternative to Flashkit.

I'm look for a snippet of code that will detect whether my swf is local or live. I did a search but didn't find one being that theres so much info here. It's a pain to have to always test in a browser rather than just in Flash. Is there some way of seeing if the movie is _root or if its living in an HTML file?

just trying to sharpen my AS skills and work faster.

cheers.

LoadVars Local V. Remote
Hi,

I'm switching some cgi apps from HTML to Flash. I'd like to run the swf and the cgi program on the same server, but I find that while I can make things behave the way I want them to on my localhost server, I can't on the remote server -- the swf either contacts the cgi script and hangs, or dies with a server error. Doesn't seem to matter whether I put things in cgi-bin, separate directories, or whatever.

I can however use the LoadVars sendAndLoad method with the remote cgi from a swf stored locally.

I've reproduced the problem with Colin Moock's echo-mx Perl script and Flash Movie (http://moock.org/asdg/codedepot/serv...ho/echo-mx.zip), so I don't think the problem is with scripts, permissions or the other usual (for me) suspects.

what section of the manual did I overlook? Something to do with security settings?

Thx

Bruce

Good On Local Not On Remote
Code:

on(release){
loadMovie("quienesSomos.swf", _root.contenido);
}
So wht would this work local but not remote? Do i need to specify absolute path for this to work on remote. Called file is in the same folder as the caller by the way.

What a day.

Local Works, Remote Does Not
Gang, I want to build an example of this and I know it's most likely going to be requested for me to get any help (I know I 'd ask the poster for one). I just am swapped and have a bug that I need the power of community to resolve.

Issue: I have an animation class instance that is created at the end of a timer (using the timer class) and when I run the swf on my computer it works. However, if I launch the swf from a site (eg. www.notarealurl.com/example.swf) then the animation never begins. I have done security sandbox stuff, which wouldn't make any sense to me as to why that prevent the animation but I did anyway.

LoadVars Local V. Remote
Hi,

I'm switching some cgi apps from HTML to Flash. I'd like to run the swf and the cgi program on the same server, but I find that while I can make things behave the way I want them to on my localhost server, I can't on the remote server -- the swf either contacts the cgi script and hangs, or dies with a server error. Doesn't seem to matter whether I put things in cgi-bin, separate directories, or whatever.

I can however use the LoadVars sendAndLoad method with the remote cgi from a swf stored locally.

I've reproduced the problem with Colin Moock's echo-mx Perl script and Flash Movie (http://moock.org/asdg/codedepot/serv...ho/echo-mx.zip), so I don't think the problem is with scripts, permissions or the other usual (for me) suspects.

what section of the manual did I overlook? Something to do with security settings?

Thx

Bruce

Remote Swf Linking To A Local Flv
Hello,
I first posted this in the HTML forums, but I was wandering if anyone has tried this:

Here is ultimately what I am trying to accomplish:  Web server holds the swf player component, but i want the flv file to reside on local machines for playback.

here is the web server's html:
CODE<object type="application/x-shockwave-flash" width="400" height="350"

wmode="transparent" data="flvplayer.swf?file=C:/sample.flv&autoStart=false">

<param name="movie" value="flvplayer.swf?file=C:/sample.flv&autoStart=false" />

<param name="wmode" value="transparent" />

LoadVariables From Remote Server - Have Tried All Methods Suggested
The end goal is to load variables in a text file from a remote server into an swf file on a local computer.

For the project I'm working on it MUST work in Flash 5 (doesn't matter about any other version...)

I have tried:

1. Loading text file directly. Doesn't seem to work because it is loading data across domains

2. Shim Method. Local swf loads a remote swf which loads a tetx file from the same remote server. Doesn't work - don't know why.

3. Can't use Proxy methos because the computer hosting the local swf cannot run ASP/PHP etc.

Can anyone point me in the direction of a solution?

Thanks

Can A Remote SWF Read A Local File?
Can a remote SWF somehow be granted permission to read local files? I know it doesn't work by default. But is there some mechanism whereby users, who trust the remote SWF in question, could permit this to happen?

Can A Remote SWF Read A Local File?
Can a remote SWF somehow be granted permission to read local files? I know it doesn't work by default. But is there some mechanism whereby users, who trust the remote SWF in question, could permit this to happen? For example, is there a way to digitally sign a
SWF (similar to code signing in Java) which permits this sort of thing?

Connecting To Remote FMS From Local Flash
hello;

I am testing with 2 different servers, both are on internet webservers:
server A: Flash Communication Server ... rtmp://server_A.com
server B: Flash Media Server ... rtmp://server_B.com


I have a FlashCS3 application that attempts to netconnect;


test A - while in the FlashCS3 authoring environment I attemp to connect to server A; the netconnection is rejected ( however if I post the .swf to the webserver that hosts server A, the netconnection is successful );

test B - while in the FlashCS3 authoring environment I attemp to connect to server B ... netconnection is successful;


any thoughts as to what the rules are for connecting to a remote FCS/FMS from a local Flash environment??


thanks
dsdsdsdsd

Different Behaviour In Local And Remote Clips
I'm in the process of writing a flash framework that is used to load other swfs in as 'applications'. The framework provides a simple API by attaching some functions to the _root, so that loaded applications may call them using _root.whatever(...).

This is all working beautifully.. except for one thing:

I want to allow loaded applications access to per-application named singletons. This works perfects when run locally.

BUT: When uploaded and run in a browser the singleton objects retuned by the functions in 1.swf are always undefined!

I know, through debug statements and a debug output window, that when running remotely the singleton object is definatley created only once, and subsequent requests for it return the created object.

Here's what happens.
the main framework, 1.swf is loaded
This in turn loads (say) app.swf
app.swf contains two movieclips, both of which call
_root.getSingleton(this,"globals");
Where the function getSingleton has been placed onto _root by 1.swf when it loads.
However, although the debug output for the function getSingleton shows it's returning an object, by the time it gets back into the clips in app.swf, the object has become undefined!

I have seen this sort of behaviour before. Return values from functions sometimes just going missing in transit and becoming undefined. Does anybody have any ideas? I don't think that it can be a security issue, since all the swfs are loaded from the same server.

Connecting To Remote FMS From Local Flash
hello;

I am testing with 2 different servers, both are on internet webservers:
server A: Flash Communication Server ... rtmp://server_A.com
server B: Flash Media Server ... rtmp://server_B.com


I have a FlashCS3 application that attempts to netconnect;


test A - while in the FlashCS3 authoring environment I attemp to connect to server A; the netconnection is rejected ( however if I post the .swf to the webserver that hosts server A, the netconnection is successful );

test B - while in the FlashCS3 authoring environment I attemp to connect to server B ... netconnection is successful;


any thoughts as to what the rules are for connecting to a remote FCS/FMS from a local Flash environment??


thanks
dsdsdsdsd

Play Local File Through Remote SWF
Hi,

How a remote SWF file ( downloaded from internet ) , can play a local audio file in browser.
ie. local file is c:music.mp3

In more detail,
For example I have file http:www.a.com/test.swf where it has to play a local audio file c:music.mp3

Error:
Actually when i tries to play the music file it throws the security exception..
And according to application sandbox type.. My application returns me Security.sandboxType = remote..

If anybody have solution of this problem then please help me out.. (j2medevelopersupport@gmail.com)
Thanks in advance..

Mohit Goyal

[HELP] Remote XML Not Loading In Local Flash
( i had previously posted this topic under the ActionScript area, but with no responses, and later discovered this problem only relates to newer versions of flash )

i'm producing a cd-rom which will contain a flash projector that will auto-run when the cd is inserted.

one of the features of the Flash application is that it must read xml output from a php file off of our company's website. unfortunately, I can't seem to find a way, after scouring the internet for 2 days, digging through forums, and trying every permutation of my code I could possibly come up with.

I am aware of the cross-domain policy file, which we have in place.
I am aware the flash application needs to load this file, which it (supposedly) does. (i've replaced my company's domain name with MYDOMAIN for security purposes)
I also included this code to try and cover every base I can think of:

Code:

System.security.loadPolicyFile("http://www.MYDOMAIN.com/crossdomain.xml");
System.security.allowDomain('*');
System.security.allowInsecureDomain('*');
My application so far just chooses to silently fail when attempting to read the file I'm requesting, even though I know my PHP and XML outputs are exactly to specifications.

Adobe's website has been of NO help whatsoever, and right now the forums over there are undergoing maintenance.

I'm pulling my hair out, and in need of this community's expertise.
I am a beginner to intermediate flash developer.



I have another part of the movie which is accessing a local XML file, which works just fine. Either way I publish the movie (local access only / network access only), this thing refuses to load my remote XML and I have no idea why.

Here is the present code which (should work):
Keep in mind that results_txt is a dynamic multi-line text field, whose instance name is 'results_txt'.
I also realize DisplayNodes isn't being called below (i have tried using it, but also ... to no avail. I put it in here so if anyone figures this out, they'll know how I'm trying to report the data retrieved).
my 'certifier_xml' object calls load('http://www.MYDOMAIN.com/get_cert_xml.php?T=MN&TYPE=bsc') from a ComboBox which triggers load during the 'change' event.


Code:
results_txt.text = ""; // Reset result text when frame is displayed.
// Specify an XML object we can use to access our data
certifier_xml = new XML();
certifier_xml.ignoreWhite = true;
certifier_xml.contentType = "text/xml";
certifier_xml.onLoad = function(success) {
trace("Load attempted");
if(success) {
trace("Load succeeded");
results_txt.text = certifier_xml;
}
}
/**
* DisplayNodes()
* @param String[] nodes
* @param String field_txt
*/
DisplayNodes = function(nodes, field_txt){
field_txt.htmlText = "";
for (var i=0; i<nodes.length; i++){
var entry ="";
for(j=0;j<nodes[i].childNodes.length;j++)
{
entry += nodes[i].childNodes[j].firstChild.text;
}
field_txt.htmlText += entry+"
";
}
}
PLEASE HELP

Load Local Image From Remote SWF
I might be getting into the security issues again, but if I know the path to a local image, can I have a remote SWF load it? ie: through loadClip?

Local Swf Loading Variables From Remote Php
I'd like to be able to load variables from a remote file to a local swf.
Apparently you cannot do this with loadVariables. Is there any way
to get around this?

Thanks.

Problems With Loadvars And Local/remote Files
I have a flash document that imports some variables from a text file in the same directory as the flash document. The problem is that it only loads the variables in certain circumstances.

If you try to access the flash document directly, everything is fine. The table @ the bottom is the one dynamically populated from the text file variables:

http://www.bostonbloggers.com/problem.swf

same thing with an html file, on the same server, that contains an embed tag for it:

http://www.bostonbloggers.com/problem.html

The problem is when I try to embed the flash document into an html file on another server:

http://24.61.212.36:8080/Test/problem.html

Any ideas? Here is my code. Its fairly simple:


Code:
unicodeData = new LoadVars();
unicodeData.source = "comments.txt";
unicodeData.load(unicodeData.source);
unicodeData.onLoad = function(){
.
.
}

Problem With Loading Remote Image To Local Swf
Hi,

I have the following code to load an image file(jpg) from remote server to a local swf. But it just says "Error opening URL".


Quote:




var swf:MovieClip = _root.createEmptyMovieClip("swf", _root.getNextHighestDepth());
var loader:MovieClipLoader = new MovieClipLoader();
var obj:Object = {};
obj.onLoadInit = function(target_mc:MovieClip) {
trace("onLoadinit");
};
loader.addListener(obj);
loader.loadClip("http://192.168.1.2/image/image02.jpg", swf);
trace(System.security.sandboxType);




I think it's a security issue. But the result of trace(System.security.sandboxType) is localTrusted.
According to the Flash Player 8 Security document, "SWF files assigned to the local-trusted sandbox can interact with any other SWF files, and load data from anywhere (remote or local).".
I have tried this image URL in the browser and it's OK.

Now I am confused. Do you guys have any suggestions?
Any help will be appreciated.

Problem With Loading Remote Image From Local Swf
Hi,

I have the following code to load an image file(jpg) from remote server to a local swf. But it just says "Error opening URL".


Quote:




var swf:MovieClip = _root.createEmptyMovieClip("swf", _root.getNextHighestDepth());
var loader:MovieClipLoader = new MovieClipLoader();
var obj:Object = {};
obj.onLoadInit = function(target_mc:MovieClip) {
trace("onLoadinit");
};
loader.addListener(obj);
loader.loadClip("http://192.168.1.2/image/image02.jpg", swf);
trace(System.security.sandboxType);




I think it's a security issue. But the result of trace(System.security.sandboxType) is localTrusted. According to the Flash Player 8 Security document, "SWF files assigned to the local-trusted sandbox can interact with any other SWF files, and load data from anywhere (remote or local).".
I have tried this image URL in the browser and it's OK.
Now I am confused. Do you guys have any suggestions?
Any help will be appreciated.

Can Swf In Remote Sandbox Load Local File?
Hi,
does anybody know if it is at all possible to distribute swf on a server which will load data from local computer?
I've been asked to do this for an information kiosk - a client wants swf deployed on server running in fullscreen IE to load videos from a folder on a local machine. (those videos are huge, so they would consume too much bandwitdth if loaded from server). If I have that swf running locally (set up as local trusted file) and I'm accessing it from IE as file:///C:/CFusionMX7/wwwroot/test.swf it works fine, but it doesn't load any video if I access the same local file as http://localhost:8500/test.swf or remote file as http://www.somedomain/test.swf Does anyone has experience with sth similar? Do I simply have to deploy locally or is there some workaround? Thanks.

Reading Local Variables In Remote FMS Application
How do read and display a variable from a local swf to a remote swf continuosly? For example, I have an swf that reads in XML data constantly on my local machine and I need to have a remote swf running off FMS display said data. Basically, if im logged into the remote app I can see the variable that hold that XML data from the local swf.

I looked into SharedObjects but can't seem to get this to work continuously, like a clock.

Thanks,
Gabe

Local Flash Accessing Remote Php Scripts
Hi, I am pulling my hair out on this. I am trying to develop flash locally and want to talk to remote php scripts. I have added a crossdomain.xml file to the remote server in question as well as the following to my local flash file in frame 1


ActionScript Code:
System.security.allowDomain("*");


Whenever using loadVars i get "Error opening URL"... I understand generally how sandbox/security works but i can't get this to work

Here's my loadVars code:


ActionScript Code:
var exhibit_vars:LoadVars = new LoadVars();
exhibit_vars.onLoad = function (success) {
    if(success)
        trace(this.toString());
    else
        trace("vars failed to load!");
}
exhibit_vars.load("http://mydomain.com/v2/flashapi/api.php?atype=cExhibit");


Can anyone help me, please??

Thank You.

Like The Guy Downstairs, Tutorial Works On Local Server, But Not On Remote
Ok have uploaded everything in the remoting bb directory in the order that it appears on my computer.
Have setup mySQL on the site in the same way that it is on my computer.
Have also uploaded all of flashservices/apps is there anything else i need to upload to get it working on the net?

Just went throught the Net Debugging and it comes up;

The Connect -

ConnectString: "http://members.lycos.co.uk/remotingBB/simple_gateway.php"
DebugId: 0
EventType: "Connect"
MovieUrl: "http://members.lycos.co.uk/deliriousphil/remotingBB/read.swf"
Protocol: "http"
Source: "Client"
Time: 1049469105090
Date (object #1)
....."Fri Apr 4 17:11:45 GMT+0200 2003"

The Call

DebugId: 0
EventType: "Call"
MethodName: "read.doRead"
MovieUrl: "http://members.lycos.co.uk/deliriousphil/remotingBB/read.swf"
Protocol: "http"
Source: "Client"
Time: 1049469105150
Date (object #1)
....."Fri Apr 4 17:11:45 GMT+0200 2003"
Parameters (object #2)
.....[0]: 0
.....[1]: 10

The Status -

EventType: "Status"
MovieUrl: "http://members.lycos.co.uk/deliriousphil/remotingBB/read.swf"
Source: "Client"
Time: 1049469105970
Date (object #1)
....."Fri Apr 4 17:11:45 GMT+0200 2003"
Status (object #2)
.....code: "NetConnection.Call.Failed"
.....description: "HTTP: Failed"
.....details: "http://members.lycos.co.uk/remotingBB/simple_gateway.php"
.....level: "error"





[color=red][color=red]

Music Player: Works Via Remote Debugger/local But Not In Browser
hi there. I've got an online jukebox device in development that loads external mp3s.

www.belmont-street.com/music
(click 'kef' then mix 2 its the only mp3 actually online)

it works locally, and also if I open via remote debugger, but in the browser nowt, it won't start playing. the path is correct to the external mp3.
i'm totally stuck regards why this is happening, i've checked through all the internal code and it all seems fine.

must be missing something obvious, any pointers appreciated, its 8.30 pm now and the brain is now addled . .

Arrggh ActionScript For Flash Mail Form Works On Local, But Not Effective On Remote?
Hey guru,

I have Flash site with navigation menu and slide in & out boxes of contents for each sections - each sections has own Flash movie files.

In the 'Contact Us' section - I am trying to add 'contact form' which I've downloaded from site and it works on it own.

Now I tried to add on my exisiting Flash file in 'Contact Us' section. I tested on the localhost and works fine after filling out the form and hit subit button then form disappears with 'Message Sent' box on top (next frame).

But when I uploaded them to web hosting site - the 'Message Sent' did not show up even it has sent form in email to me anyway.

I tried different ways in scripting - only things it works localhost with this:


Code:
onClipEvent (data) {
// show message sent screen
_parent.nextFrame();
}
I have tried this way...


Code:
onClipEvent (data) {
// show message sent screen
_root.nextFrame();
}
Still no luck. Is there something I should have added for them to work on web server (remote)?

Please let me know mate!


LB

Understanding Security With Local File To Remote File
First let me explain the setup:

Our company uses a set of talking avatars in lesson Modules to help students learn Math or Writing. Each Course loads in external avatars located on our Avatar server. I have a LocalConnection (technically using SWFBridge) that has the AS3 containers loading in the AS2 version avatars (created from Character Builder by Media Semantics). I can get the LocalConnectionto accurately connect a local version of the avatars in a development environment, however once I try to access the avatars from our Avatar server, the LocalConnection refuses the connection because of the different domains (local vs the avatar server). They both have a LocalConnection, one from the Course to Avatar and vice versa. Also, the Course says it has a sandboxType of localTrusted. The error is a common one:


Code:
*** Security Sandbox Violation ***
Connection to file:///(localFilePath) halted - not permitted from http://(avatarServerPath)/avatar.swf
-- Remote SWFs may not access local files.
The issue is definately because of the Security Sandbox and I have tried : Security.allowDomain("http://(avatarServerPath)"); in the Course, and System.security.allowDomain("*") in the AS2 avatars (which are Flash Player 6) Other attempts included playing with the Publish Settings - Local Playback Security, attempting to set a setting a PolicyFile, and a few others.

I just must be missing a key part of the equation, I know it's just a small fix that I am totally missing the boat on. Any thoughts or assistance is appreciated.

Problems Casting A Remote-loaded SWF
Let's say I have 3 items in the same package:Shouter interface - requires implementers to implement the shout() function
Shell class - implements Shouter...this Shell.swf is to be loaded remotely from:
ShellLoader class - loads Shell from a remote server, casts it as a Shouter and invokes its shout() function...uses allowDomain in order to cross-domain script.
Now let's say ShellLoader.swf lives on a.com and Shell.swf lives on b.com.....I've got a cross-domain policy on b.com. Using LoaderContext's ApplicationDomain and SecurityDomain, I'm able to load and cast the Shell object as a Shouter and invoke the shout() function. Everything ok here.

Now let's say ShellLoader is run locally and is localTrusted. Shell.swf still lives on b.com. I'm now unable to use SecurityDomain property of LoaderContext within ShellLoader because it is now run locally. Shell.swf now exists in a different ApplicationDomain as my ShellLoader and I get the error "Type Coercion failed" when I try to cast the loader content as a Shouter.

Is there anyway to resolve this issue? I believe it will require Shell.swf to be loaded in the same ApplicationDomain as ShellLoader but I don't know any way to do this when ShellLoader is run locally. Perhaps this is prevented in the Flash player on purpose?

How To Pass A Var To A Movie Loaded From Remote Lo
Hi,

Does anyone know how to pass a var to a movie that has been loaded from a remote server???

The loaded movie also has the _lockroot set to true.

Is it possible???

Thanks,
Joe

How Share Vars With Movie Loaded From Remote Domain
Hello all,

I'm having a problem with a movie loaded from a remote domain reading the variables from the main loader movie.

Is there a work-around for the sandbox issue?

What I am doing is... I have loader movie that resides on the same domain as the website. It receives several variables from the html page and then loads in the appropriate header movie. The header movie resides on a remote media server which we use for all video and large SWFs. The problem is that the loaded movie does not read the variables from the main loader movie. Is there a way to make this work???

Any suggestions would be GREATLY appreciated!

Thanks,
Joe

LoadVariables Into Loaded Swf
I have a blank mc in my parent movie. A swf is loaded into it. In this loaded swf, there is a button triggering a dynamic text box, also in this loaded swf.

In normal situation the following script works.

On (release) {
loadVariables ("text.txt", _root.blankMc.txtBoxVar)

However, since this is a loaded swf, the blankMc doesn't respond to it. I tried loading mc into the blank mc of the parent movie and it works. However is a swf is loaded, it stops responding.

I am at a lost as to how to overcome this loaded swf using loadVariables to insert the text from external text file.

Can someone pls advice?

LoadVariables Not Working In Swf That Is Loaded By Another Swf
I have a project where swf file A, loads swf file B. They both reside in the same folder. So far so good, everything loads correctly.
Swf file B, has dynamic text, loaded from a text file. Played by itself, it loads the text correclty. When it is loaded "through" swf A, none of the text displays.
I know that the text is correct, that there are no security issues with the player or anything like that. I thought it may be a level issue, but I'm not sure.

Why won't it display?

Here is the code I am using in swf A:


Code:
this.attachMovie ("movie_mc", "movie_mc", 0);
Here is the code from swf B (originally from the flash help):


Code:
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean) {
if (success) {
trace(this.toString());
doStuff()
} else {
trace("Error loading/parsing LoadVars.");
}
};
my_lv.load("sample.txt");


function doStuff():Void{
textBox.text = my_lv.Subs1
trace(my_lv.Subs1)
}
The text file looks like this:

HTML Code:
Subs1=Some+text+in+here.

LoadVariables, How To Ensure They Are Loaded? One For The Techs...
I'm using the loadVariables() command to load four or five fairly small text files into movieclips. Works great, except every now and then if the network connection is really slow, or choked up, it will miss loading one of the text files, and the text field will appear blank.

Is there anyway to ensure the variables are loaded?

I've tried things like:

if (_root.songData = null) {
loadVariables("tracklist.txt",_root)
}

But this doesn't seem to help either (songData is the variables in the file, while tracklsit.txt is the name of the text file.

Is this just something wrong with my ISP / network caching!?? My ISP is acting very strange generally, and I don't know if it's my Flash movie or the network, and whether this might happen on other people's machines...

Any fixes / suggestions / answers appreciated.

-at.

Loadvariables Not Loading Txt File In Loaded Movie
I have two movies (main.swf and loaded.swf). In loaded, I use loadvariables to read in the contents of a dynamic text field. This works fine when running alone. However, the main.swf loads loaded.swf using loadMovie and loades it into the target (contentLoader) which is placed in the middle of main.swf. loaded.swf is loaded correctly into the contentLoader target however, the text field is empty. I'm assuming that there is a problem loading the text file ....
Any suggestions?

Target Prob? LoadVariables Works When Testing Each Swf, But Not When Loaded In Main?
when i test each individual swf file... all the this.loadVariables("home.txt"); etc commands work..... but when i load them into my main movie...the text files don't load but i get no errors in the output panel (usually i would get an Error loading etc etc message...)

Any idea what would be causing this or how i could fix it?

Local Connection With Newly Loaded Movies
Hey guys, I'm in the process of recoding my site with MX. Using the Local Connection option is great because it'll get rid of my compatibility issues with other browsers and Macs. I've already gotten the thing to connect and start talking between movies but once I have my main-menu movie file load a sub-menu movie file, it doesn't connect anymore.

I've tried using a few different things but to no avail. It seems to me once the new .swf loads in it's place, the option for local connection disappears...

Can anyone help?

Thanks in advance.

Peace,

J-Dub

External Loaded SWF, Access To Local Files
I don't know how/if this is possible: SWF#A runs on localhost. SWF#A (as3.0) loads SWF#B (as2.0). SWF#B internal loads config.txt from the same folder as SWF#B is positioned in. SWF#B is developed by an external company, I can't change any code here. The problem is that I recieve an error reporting that external swfs can't load local files. Therefor I think that SWF#B is loading the .txt through an file://-path, pointing relative to the same folder as SW#B. Any suggestions how I work around this problem?

Remote Flash Files Much Larger Than Remote
Hi,

I am developing a Flash 8 Pro site
on a Mac OSX Tiger

For some reason, my published Flash movie files
are much larger than I thought

When I look at the files on my hard drive,
it's telling me that my homepage HTML is around 4kb
and my SWF is around 300kb

When I upload these to my ISP and examine these
same files (using Dreamweaver's Site Managing Feature)
these files clock in at
972 kb for the HTML
176402 kb for SWF

There are a lot of Flash Buttons on the homepage
that in turn use the loadMovie function

Why do the local and remote file sizes differ so much?

thanks

Externally Loaded Sound Works On Local Machine, But Not Online.
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:
http://www.littlefenris.com/v2/

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.

Any ideas what the issue could be?

Here's the AS code for the fire:


ActionScript Code:
var campFireSFX:Sound = new Sound();//CAMPFIRE SOUND_root.campFireSound_mc.onEnterFrame = function() {    fireXDist = Math.round(this._x-fenris_mc._x);    fireYDist = Math.round(this._y-fenris_mc._y);    campFireDistance = Math.round(Math.sqrt((fireXDist*fireXDist)+(fireYDist*fireYDist)));    if (campFireDistance<200) {        if (breakIt != true) {            campFireSFX.start(0, 9999);            breakIt = true;        }    } else {        breakIt = false;        campFireSFX.stop();    }    campFireSFX.setVolume((maxVolume-campFireDistance)/2);};campFireSFX.loadSound("/sounds/319524_CampFire.mp3");

Local Runtime Sharing? Local External AttachMovie?
I've been trying and searching through the forums but I think I am searching for the wrong keywords.

Is there ANY way of setting it up so that I can use attachMovie/removeMovieClip on external swf's? I've found these runtime sharing options but I am unable to make much sense of them. What I am creating is something that would always be run locally on a machine and not up on the web.

I want to use this one main 'engine' type of file that loads heaps of different movies into it. All of them swf's. Of course I realise that I could do things the loadMovie way, but it seems in this case like an option not really suitable for what I want to do.

Thanks for any tips

Copyright © 2005-08 www.BigResource.com, All rights reserved