Load Variables/Movies From Other Domain - SOLUTION
Posted this on were-here today, thought I'd post it here as well:
Here's a way to get around the security restrictions, imposed by Macromedia, of not being able to load SWFs and variables from other domains. By using the MSXML 3.0 ServerHTTP component, I'm able to make a request to a different domain by using an ASP script, which then feeds back the binary/text data back into Flash.
Then in Flash I simply use: loadMovieNum("http://www.mysite.com/XMLFlashProxy.asp?url=http://www.othersite.com/movie.swf&contentType=application/x-shockwave-flash&dataType=binary", 0);
or for loadVariables() loadVariablesNum ("http://www.mysite.com/XMLFlashProxy.asp?url=http://www.othersite.com/stockQuotes.txt&contentType=text/plain&dataType=text", 0);
dataType parameter MUST be "text" OR "binary".
Here's the ASP code: ----------------------------------------- XMLHTTPObj.asp ----------------------------------------- <% Class XMLProxy Dim strURL Public Property Get URL() URL = strURL End Property
Public Property Let URL(mstrURL) strURL = mstrURL End Property
Public Property Get DataType() DataType = strDataType End Property
Public Property Let DataType(mstrDataType) strDataType = mstrDataType End Property
Public Function SendRequest() On Error Resume Next Dim objXML Dim strReturnXML Dim strStatus
Set objXML = CreateObject("Msxml2.serverXMLHTTP")
objXML.Open "GET", URL, False objXML.Send
strStatus = objXML.status If strDataType = "text" then strReturnXML = objXML.responseText Else strReturnXML = objXML.responseBody End If
If strStatus <> 200 then SendRequest = null Else SendRequest = strReturnXML End If End Function End Class %>
----------------------------------------- XMLFlashProxy.asp ----------------------------------------- <% @Language = "VBScript" %> <% Option Explicit %> <!--#include file="./lib/XMLHTTPObj.asp"--> <% ' ------------------------------------------------ ' Declare Variables/Objects ' ------------------------------------------------ Dim objXML Dim strResponse Dim strContentType Dim strDataType
' ------------------------------------------------ ' Create Objects ' ------------------------------------------------ Set objXML = new XMLProxy
' ------------------------------------------------ ' Assign Variables ' ------------------------------------------------ strContentType = Request.QueryString("contentType") strDataType = Request.QueryString("dataType") strURL = Request.QueryString("url")
objXML.URL = strURL objXML.DataType = strDataType strResponse = objXML.SendRequest()
If Not IsNull(strResponse) then Response.ContentType = strContentType If strDataType = "text" then Response.Write strResponse Else Response.BinaryWrite strResponse End If End If
Set objXML = nothing %>
You can download the zip here
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Cross Domain Solution: Could Not Get Bytesloaded Swf External From Other Domain
hello: good evening
I leave my problem here:
I am make a measurer of internet speed that consists one preloader (swf1.swf in www.dominio1.com) who loads a swf (swf2.swf in www.dominio2.com)
The file swf2.swf visualizes perfect in swf1.swf without problems although on swf1.swf it does not take the variables from swf2.swf to show the rate of transference, total remaining time, kb loaded and kb total.
If I use crossdomain.xml on the mother directory of the site, or both sites, the problem it persists.
I need that they indicate to me like making solve this disadvantage
if somebody knows where I can obtain a gratuitous measurer of speed, please, to indicate it:-o
Thanks you very much for all
any questions???
Edited: 01/20/2007 at 11:16:44 AM by juanctkc
How To Load Variables From Another Domain Name...
Hello,
I knew there are some commands to allow flash to load variable files from domains differents from the one the swf is in...
something like "allowUrl"...
But i cannot find anything right now...
can someone help me?
thank you
Pippo
Problems About Special Characters In Load Variables Solution
Simply open your notepad and edit your yourtext.txt file. Then click "save as" and in the encoding parameters select "UTF-8" . It is defaulty selected as "ANSI". Then save it . The problem is gone.
Solves Special Character problems in Turkish , Spanish or so.
__________________
Berkay UNAL
Pure Digital Media
http://www.berkayunal.com
Cross Domain Solution, Need Do I
I'm working on a banner campaign that requires some method of sending text to the flash banners from one source. The banners will be on many different servers but we cannot use crossdomain.xml or anything else that would need to be placed in the root. Right now I'm using xml to load the text but of course that doesn't work.
Is there any other safe method to do this? Any advice?
[AS][Cross-domain][Solution]
Hi man i hope this could be a christmas gift for some people !
I've the cross domain problem. Vars from external domain could not be loaded from FlashMX exported movies played on Flash Player 7.
First solution ( not acceptable for me ) is re-exporting clips with MX2004, and reuploading ( **** Macromedia !!! )
My-solution : i made an asp ( of course can be made in jsp, php, cgi, etc. ) that redirects your request to anywhere, so you can forget cross-domains
<%
Response.Buffer = True
Dim objXMLHTTP, xml
Set objXML = Server.CreateObject("Microsoft.XMLHTTP")url="http://www.externaldomain.com/xxx?"&Request.queryString
objXML.Open "GET", url , False
objXML.Send
Response.Write objXML.responseText
Set objXML = Nothing
%>
of course this works if you can exec some script server language, else you must buy MX2004 to make your flashMX webs keep working when people installs flash player 7. In my oppinion this must be illegal, i don't understand why macromedia keeps giving headaches to developers, they want to sell their product, but forcing people is not the right way.
Well, happy hollydays for everyone
Load Variables And Duplicating Movies
i have a movieclip called N inside a movieclip in the main timeline.
I will load the "Total" variable from a PHp but until then i use a txt with Total=23; this will make 23 copies of the N movie clip.(when i use PHP that number can be any number).
and in this timeline i have this code:
Code:
//carga de la variable
myVars = new LoadVars();
myVars.load("files.txt");
myVars.onLoad = function() {
chucheta = this.Total;
trace(chucheta);
};
//la multiplicacion de las movies
for (count=0; count<chucheta; count++) {
this.N.duplicateMovieClip("N"+count, count);
this["N"+count].numero.htmlText = count+1;
this["N"+count]._x = -300+(this["N"+count]._width+1)*count;
}
//carga primera foto y borrado de la movieclip original
//this.Photo.loadMovie("imagenes/1.jpg");
this.N._y = -1500;
this.N._alpha = 0;
if i replace the "chucheta" variable with a number works fine but when i try to use the variable "chucheta" to replicate the movie nothing works.
It seem to blank the variable outside the function
PD this movie it gonna load in a main movie with myMC.loadMovie();
Also i attached the fla file
theguaz
Load Variables And Duplicating Movies
i have a movieclip called N inside a movieclip in the main timeline.
I will load the "Total" variable from a PHp but until then i use a txt with Total=23; this will make 23 copies of the N movie clip.(when i use PHP that number can be any number).
and in this timeline i have this code:
Code:
//carga de la variable
myVars = new LoadVars();
myVars.load("files.txt");
myVars.onLoad = function() {
chucheta = this.Total;
trace(chucheta);
};
//la multiplicacion de las movies
for (count=0; count<chucheta; count++) {
this.N.duplicateMovieClip("N"+count, count);
this["N"+count].numero.htmlText = count+1;
this["N"+count]._x = -300+(this["N"+count]._width+1)*count;
}
//carga primera foto y borrado de la movieclip original
//this.Photo.loadMovie("imagenes/1.jpg");
this.N._y = -1500;
this.N._alpha = 0;
if i replace the "chucheta" variable with a number works fine but when i try to use the variable "chucheta" to replicate the movie nothing works.
It seem to blank the variable outside the function
PD this movie it gonna load in a main movie with myMC.loadMovie();
Also i attached the fla file
theguaz
Difficulties With Loading Movies That In Turn Load Variables
hi, I have a problem with loading movies that contain loaded variables ,
here is what I'm trying to do:
Main Movie (loadMovie ("reset.swf", _level0.MC))
reset.swf (loadVariables ("crimea.txt", _level0.text))
and the problem is that the text (=crimea) isn't displayed
Have you any ideas of what is wrong?
[Edited by snaver on 07-27-2001 at 06:53 AM]
Load Variables... Loading Text In Multiple Movies
I have a .txt file that I want to store all my text in.
I have 5 movies that use the .txt file.
I have on the main timeline:
loadVariables("menu.txt", "systems");
movie 1 is "systems"
but the other 4 are different instance names.
and on the main timeline I don't want to have 5 total commands that say, loadVariables("menu.txt", "4 other instance names");
Can I have one loadVariables that will work in 5 different movies that have 5 different instance names???
Thanks,
Best Solution For Loading 6 Movies One After Another?
Hi,
This might have been asked a thousand times before but I couldn't make it work by myself taking the pieces of code I found in other threads.
I've got my "movie_loader" set up and 6 movies to load into it one after another, but I can't make it work right. Could anyone please help me with the right lines of code?
Thanks in advance
Preloading Movies With AttachMovie Solution
I have seen a lot of people asking how to preload a movie with exported MCs in them. So here is code that works. Your main movie does not need a preload scene instead you have a loader movie which is on the root level. Make this just as you would your preloader scene. On the percentage preloader MC where your script is place this code.
Code:
onClipEvent (load) {
loadMovie ("Mainmovie.swf", "_level1");
_parent.loadingbarMC._xscale = 0;
}
onClipEvent (enterFrame) {
var total = _level1.getBytesTotal();
var loaded = _level1.getBytesLoaded();
percent = (loaded/total*100);
_parent.loadingbarMC._xscale = percent;
if (loaded == total) {
_level1._alpha = 100;
} else {
_level1._alpha = 0;
}
}
When the loadingBar MC loads in it loads the main swf into level1 since the getbytesloaded does not match getbytestotal for that level the alpha of level1 is set to 0 and the preloader churns away until loaded is equal to total then the level1 main movie alpha is set to 100. Remember to check your pathing for the loadbar.
Access Variables From A Different Domain?
It looks like with "loadvars" I am unable to access info on another server. That's because the manual says so. Is there a work around? Or is it tought luck?
And the reason why....
to store a text file on my server, under my domain, so that I can control the variables within it. And then build a movie for someone else, hosted elsewhere, that refers to mine in order to get some variables.
Further explanation.
I'm actually feeling a little malicious, and was hoping to set up a flash movie within a website that will open up a new web page with something in it - porn/rate my poo.com/rotten.com/other stuff on the internet that's not very pleasant for the average user to pop up. I would have the text file on my PC, and then maybe have a list of URL's in there, which the flash movie would choose, and another variable to switch it on and off.
Something like
loadvars ("http://www.me.com/hack.txt");
etc etc, where me.com is me, not them... Get it?
Maybe I should stop whinging.
But, if there is anyone clever out there who can think of something, that'd be cool. But wrong. But cool. And I'm not enough of a geek to do redirects and get right inside the computer, so I won't.
Help ActionScript Variables On Other Domain
I hope somebody can help me out. I have been thumping my head on this one for awhile. I have javascript calling within actionscript and it seems to work on every domain on my server but does not work on any other domains. The code is this:
varsObject.theurl = flash.external.ExternalInterface.call( 'function() { return window.location.toString(); }' );
( works in FireFox only mind you )
I figured it must be somehow a cross domain policy issue. So in my fla file at the top i put
System.security.loadPolicyFile("
Sending Variables To Another Domain?
Hello Kirupa forum!
This place seems to be a good place to get an answer to my problem!
I'm sending variables with loadVariablesNum to a php-script on another domain in order to send emails through flash. My server for the flash-file doesn't support ASP/PHP.
I've tried to send the variables both using loadVariables and getURL. This is working perfect with getURL, but not with loadVariables..
Can't flash send variables to another domain?
getURL(path, 0, "POST") -- this works very well!
loadVariablesNum(path, 0, "POST") -- doesn't work
(the variables are inside a movieclip)
Sending Variables To Another Domain?
Hello Kirupa forum!
This place seems to be a good place to get an answer to my problem!
I'm sending variables with loadVariablesNum to a php-script on another domain in order to send emails through flash. My server for the flash-file doesn't support ASP/PHP.
I've tried to send the variables both using loadVariables and getURL. This is working perfect with getURL, but not with loadVariables..
Can't flash send variables to another domain?
getURL(path, 0, "POST") -- this works very well!
loadVariablesNum(path, 0, "POST") -- doesn't work
(the variables are inside a movieclip)
Flashvars Variables Solution
Anyone using flashvars in their object and embed tags to pass variables from a page to your movie, just thought I'd let you all know what I just learned the hard way:
If you're passing any variables that are numerical and required for any mathematical functions you may have, be sure to
Quote:
theVar=Number(theVar);
before trying to use it. Otherwise I'm assuming it just treats it as a string.
Cross Domain Variables Issue
Hi
I have swf A on domain A which loads an XML data file.
Domain B hosts swf B which loads swf A.
I have set up a crossdomain xml file on domain A which has allowed the data from the xml data file to be successfully viewed when swf A is loaded into swf B on domain B.
However I cannot access any variables from swf A in swf B.
I have tried a number of examples and none of them seem to work.
Load Swf Only At My Domain
Hi,
I have a flash movie made already but wants to have it loaded / shown only when it is played from my website domain n not others or even in local computer.
How do I write a script to check the URL variable such that if the SWF is opened from mydomain.com, it will load. If the SWF is opened from otherdomain.com or local computer, it will not load / display nothing at all.
I searched the forum and found something similiar
http://www.flashkit.com/board/showpo...68&postcount=6
However I am not opening an image but the whole flash file from my website (php). I want to prevent users from gaining access to my swf files from outside my domain like from the temporary internet files where the swf is downloaded while viewing. Even if they click the swf file from the temp internet folder, it should open up from my domain, if not, it should not display anything.
Please help! I am still quite a beginner at Flash or Actionscripting. All advice are appreciated!
XML Not Load From Different Domain?
Hi all, I'm traying to load an xml from diferent domain : my SWF works in my local computer it load the XML but when i put my swf in my server the XML not load , im tried to use croosxml, allowdomain and many other things like changing CHMOD in the xml file but the XML not load.. please could some one help me with this.......................
Send Flash Variables To A Php File On A Different Domain.
I have been at this for two weeks now. I am trying to send two variables from a flash file located on newgrounds.com, kongregate.com, armorgames.com or any other site like that to a php file on my site pogolama.com.
I have read through most of the adobe manuals for security and still have no Idea how to use those features, that's why there are so many variations of them in my code.
I can not figure out why my php file will not get the variables I am sending it. In the following code I simplified all of my php code for testing purposes and I still cant even echo the variables that are supposed to be sent.
I am using a virtual dedicated server on godaddy.com also I tried it on their free web hosting and their cheapest hosting plan. I have the crossdomain.xml file uploaded to pogolama.com/public_html/crossdomain.xml and have tried uploading it to pogolama.com/crossdomain.xml.
Im not sure what else to say except, someone please help.
Action Script 2.0
Code:
varsToSend = new LoadVars();
varsToSend.player_name = player_name;
varsToSend.player_score = running_time;
varsToSend.send("http://www.pogolama.com/view.php", "POST");
import flash.system.Security;
import flash.system.* ;
System.security.allowDomain("www.pogolama.com");
System.security.allowDomain("pogolama.com");
System.security.allowDomain("*");
System.security.loadPolicyFile("pogolama.com/public_html/file.xml")
System.security.loadPolicyFile("http://www.pogolama.com/public_html/file.xml");
PHP
PHP Code:
<?php
$player_name = $_GET[player_name]; /* I have one set to GET and on to POST just to test if that is the problem. */
$player_score = $_POST[player_score];
echo $player_name;
echo $player_score;
?>
Crossdomain.xml
Code:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" />
<allow-access-from domain="www.kongregate.com" />
<allow-access-from domain="*.kongregate.com" />
<allow-access-from domain="www.kongregate.com/*" />
<allow-access-from domain="www.pogolama.com" />
<allow-access-from domain="*.pogolama.com" />
<allow-access-from domain="www.pogolama.com/*" />
</cross-domain-policy>
Send Flash Variables To A Php File On A Different Domain.
I have been at this for two weeks now. I am trying to send two variables from a flash file located on newgrounds.com, kongregate.com, armorgames.com or any other site like that to a php file on my site pogolama.com.
I have read through most of the adobe manuals for security and still have no Idea how to use those features, that's why there are so many variations of them in my code.
I can not figure out why my php file will not get the variables I am sending it. In the following code I simplified all of my php code for testing purposes and I still cant even echo the variables that are supposed to be sent.
I am using a virtual dedicated server on godaddy.com also I tried it on their free web hosting and their cheapest hosting plan. I have the crossdomain.xml file uploaded to pogolama.com/public_html/crossdomain.xml and have tried uploading it to pogolama.com/crossdomain.xml.
Im not sure what else to say except, someone please help. :)
Action Script 2.0
varsToSend = new LoadVars();
varsToSend.player_name = player_name;
varsToSend.player_score = running_time;
varsToSend.send("
Do You Need To Load Gif's? Here's A Solution
if you have a project that you need to dynamically load gif images, you have probably found out already that it's not gonna happen.
i too had this problem. while there is no solution for flash yet, there is a hack that could work for you.
say hello to your new friend ImageMagik
http://www.imagemagick.org/
image magik is a utility you can use to do all sorts of nifty things to image files from the command line. but, we are interested in converting gif files here.
since you can load jpegs the process is to create a converted copy all of your unsupported image files to jpeg format.
so now if you have dynamic files and paths stored in xml or a DB like myself, your flash app can go to the same path, same file name, and just by changing the extension to ".jpg" load in the image.
sure it's a hack. but it beats telling your boss/client "we can't do gifs".
Cross-platform Solution To Insert Html File Into Flash Movies To Facilitate Updates?
Hello, I hope somebody can help me out here...
Is there any cross-platform cross-OS way of inserting a HTML file into a FLASH movie to facilitate updates? In other words I would like to be able to tell FLASH to use an external HTML or INC file so that if I have to change something in the text I can simply change a small HTML file and not be forced to open the big FLA movie, change, export and upload again... Also it would help me a lot when I do websites in FLASH and NON-FLASH versions for low-bandwidth users because I would need to just update one file instead of two... I hope a solution exists... PLEASE share it with me!
Load FLVs From Different Domain
Hi there.. I was wondering if Flash player will load FLVs from a location different than where the main swf is? So the FLV are on a different server with different domain.. Is that possible? I tried it and it doesn't seem to work..
Thanks.
Mo
Variables Coming Back Undefined? Any Ideas For A Solution?
Hi all.
I am having a problem with variables in flash.
On the first keyframe I have a variable as part of my xml object. Which is all fine. and example would be:
ActionScript Code:
var whichClient:Number;
This is basically my index for keeping track of my xml node or position.
However I would like to use this value in a different area of my movie, the advantage of this is that I can use the loadMovie and of course call whichClient + swf etention, this way I can perform other tasks,
but the variable is coming back undefined.
I have tried also just creating a variable:-
ActionScript Code:
var message="hello world"
on the main time timeline, and called this from within a mc, and i had the same problem, it came back undefined.???
please help
Trev
Flash 5-6: Load XML From Different Super Domain?
Hi, I am trying to load XML into a Flash 5 movie, the superdomain in in the XML file's URL is different from that of the SWF.
my problem is:
"SWF files running in a version of the player earlier than Flash Player 7, the url parameter must be in the same superdomain as the SWF file that issues this call."
I know there are a few methods to overcome this limitation but not sure what they are, if you know of any please let me know.
Thanks
LeoBeer
How Do I Load A Movie On Another Domain That Reads XML?
How do I load a movie on another domain that reads XML?
I have a flash file: abc.swf.
This reads xyz.xml.
Both reside on: www.mywebsite.com.
I want to have a HTML file on: www.myotherwebsite.com that contains a link to www/mywebsite.com/abc/swf.
OK... I had no idea this isn't straight forward.
I've been looking a the following for some guidance:
http://www.moock.org/asdg/technotes/...inPolicyFiles/
But... I'm not getting anywhere.
I've created the crossdomain.xml file and stuck it on www.mywebsite.com.
This didn't work.
The instructions weren't clear at all.
So... I stuck it on www.myotherwebsite.com as well.
Still no luck.
Where am I going wrong?
Thanks.
OM
How Do I Load A Movie On Another Domain That Reads XML?
How do I load a movie on another domain that reads XML?
I have a flash file: abc.swf.
This reads xyz.xml.
Both reside on: www.mywebsite.com.
I want to have a HTML file on: www.myotherwebsite.com that contains a link to www/mywebsite.com/abc/swf.
OK... I had no idea this isn't straight forward.
I've been looking a the following for some guidance:
http://www.moock.org/asdg/technotes/...inPolicyFiles/
But... I'm not getting anywhere.
I've created the crossdomain.xml file and stuck it on www.mywebsite.com.
This didn't work.
The instructions weren't clear at all.
So... I stuck it on www.myotherwebsite.com as well.
Still no luck.
Where am I going wrong?
Thanks.
OM
Load Image From Another Domain Using Flash Cs3
Hi there, absolutly newbie here
I made this flash-actionscript3 wich calls an php genarated xml wich has 3 text fields and one image name. I works as desired if the image is stored in the same server, but fails if it's not.
Wokring example :
<xml>
<title>Title</title>
<description>Description</description>
<url>http://www.example.com</url>
<image>image.jpg</image>
</xml>
Not working example :
<xml>
<title>Title</title>
<description>Description</description>
<url>http://www.example.com</url>
<image>http://www.anotherdomain.com/image.jpg</image>
</xml>
Any hints?
Thank you very much in advance.
Load Xml File And Cross Domain
Hi, good year..
I have some problems with security file e load xml.
I have u file xml on
http://www.centrocartucce.it/slideshow.xml
but the file swf is on
http://www.actiondesign.it/slide.html
in local inside IDE of flash is ok but online don't work
this is as:
ActionScript Code:
System.security.allowDomain("http://www.centrocartucce.it");
//System.security.loadPolicyFile("http://www.centrocartucce.it/slideshow.xml")
var myXML:XML= new XML();
myXML.ignoreWhite= true;
myXML.onLoad= function(ok){
if(ok){
trace(this);
debug_txt.text= this;
}else{
debug_txt.text= "non caricato";
}
}
myXML.load("http://www.centrocartucce.it/slideshow.xml");
i have create a file crossdomain.xml and put it in www.actiondesign.it/crossdomain.xml
but it don't work
help me please.
thanks
Cross Domain Load? It Looks All Local To Me
So I'm getting hefty security issues to pop up. This flash .exe file runs on its own, but pulls from other servers on the network. Its for some internal communications.
My main .swf (my exe) loads in a local file. the local file loads in a flashpaper document. My doc crashes, or I get this...
*** Security Sandbox Violation ***
SecurityDomain 'http://devs/pl/PPT/PPTtest2.swf' tried to access incompatible context 'file:///C|/Documents%20and%20Settings/jmilan/Desktop/pl%5FII%5FFLAs%5Fv2/PPT.swf'
*** Security Sandbox Violation ***
SecurityDomain 'http://devs/pl/PPT/PPTtest2.swf' tried to access incompatible context 'file:///C|/Documents%20and%20Settings/jmilan/Desktop/pl%5FII%5FFLAs%5Fv2/PPT.swf'
*** Security Sandbox Violation ***
(it goes on forever)
I've been looking through tutorials, and trying various things, but I feel that maybe I know too little about this to be making an accurate judgement (none of them are "really working").
I tried the System.security.allowDomain, but I wonder why i need to do this. I use http: because its all local network, but users don't always have permission-- so I haven't been using the direct server names.
Any ideas?
Load Xml File And Cross Domain
Hi, good year..
I have some problems with security file e load xml.
I have u file xml on
http://www.centrocartucce.it/slideshow.xml
but the file swf is on
http://www.actiondesign.it/slide.html
in local inside IDE of flash is ok but online don't work
this is as:
System.security.allowDomain("http://www.centrocartucce.it");
//System.security.loadPolicyFile("http://www.centrocartucce.it/slideshow.xml")
var myXML:XML= new XML();
myXML.ignoreWhite= true;
myXML.onLoad= function(ok){
if(ok){
trace(this);
debug_txt.text= this;
}else{
debug_txt.text= "non caricato";
}
}
myXML.load("http://www.centrocartucce.it/slideshow.xml");
i have create a file crossdomain.xml and put it in www.actiondesign.it/crossdomain.xml
but it don't work
help me please.
thanks
How Do I Load A Movie On Another Domain That Reads XML?
How do I load a movie on another domain that reads XML?
I have a flash file: abc.swf.
This reads xyz.xml.
Both reside on: www.mywebsite.com.
I want to have a HTML file on: www.myotherwebsite.com that contains a link to www/mywebsite.com/abc/swf.
OK... I had no idea this isn't straight forward.
I've been looking a the following for some guidance:
http://www.moock.org/asdg/technotes/...inPolicyFiles/
But... I'm not getting anywhere.
I've created the crossdomain.xml file and stuck it on www.mywebsite.com.
This didn't work.
The instructions weren't clear at all.
So... I stuck it on www.myotherwebsite.com as well.
Still no luck.
Where am I going wrong?
Thanks.
OM
Security Domain? URLLoader.load()
i have a loader.load(request) which loads a php file, it works from my local testing, but when i upload it to the server, it does not respond, or error out.
how do i set it so that it can send and load to/from the same domain online?
thanks in advance.
Load Xml File And Cross Domain
Hi, good year..
I have some problems with security file e load xml.
I have u file xml on
http://www.centrocartucce.it/slideshow.xml
but the file swf is on
http://www.actiondesign.it/slide.html
in local inside IDE of flash is ok but online don't work
this is as:
System.security.allowDomain("http://www.centrocartucce.it");
//System.security.loadPolicyFile("http://www.centrocartucce.it/slideshow.xml")
var myXML:XML= new XML();
myXML.ignoreWhite= true;
myXML.onLoad= function(ok){
if(ok){
trace(this);
debug_txt.text= this;
}else{
debug_txt.text= "non caricato";
}
}
myXML.load("http://www.centrocartucce.it/slideshow.xml");
i have create a file crossdomain.xml and put it in www.actiondesign.it/crossdomain.xml
but it don't work
help me please.
thanks
Flash 8 - AS2 - Cross Domain XML Load Error
Hi there,
I'm having some problems with loading a xml file.
Got a swf that must load a xml file from a different server.
For different domain I inserted this code:
System.exactSettings = false;
System.security.allowDomain ("domain.com");
On the html markup file I inserted:
'allowScriptAccess', 'domain.com',
Running on Flash IDE it all goes right, but once online there is always an
xml load error.
Can anyone help me?
Thanks
Asp Data Load Dynamic Text Unicode Solution
I had several sleepless nights to solve MX pro unicode problem.. But I couldn't.
So I wrote a function for ASP(not actionscript, for Active server pages). When you try to load data from db, this function changes unsupported characters into characters you choose then send data to flash, better than strange characters.
function unicode(str_target,new_str)
new_str = ""
str_target = ucase(str_target)
lenofstr = len(str_target)
i = 1
do while not i = lenofstr+1
temp_str = right(left(str_target,i),1)
if temp_str = "Ö" then
temp_str = "O"
elseif temp_str = "Ç" then
temp_str = "C"
elseif temp_str = "Þ" then
temp_str = "S"
elseif temp_str = "Ý" then
temp_str = "I"
elseif temp_str = "Ð" then
temp_str = "G"
elseif temp_str = "Ü" then
temp_str = "U"
end if
new_str = new_str & temp_str
i = i+1
loop
end function
usage is :
unicode dob,dobx
response.write "&namesurname=" &adsoyadx
response.write "&dob=" &dobx
Remember this function works in ASP only.
Questions? Mail to me at erkanozsoy@cronostr.com
Load Movie Specific Frame: No Solution Works
Hi!
I want to load some movies at specific frames, by clicking some buttons on another movie. I have several problems, and have tried everything...
This is the ways I tried:
Movie1:
Button1:
on (release) {
loadMovie("dos.swf", 1);
vars = button1;
}
Button2:
on (release) {
loadMovie("dos.swf", 1);
vars = button2;
}
Movie2:
(I have a preloader.)
if (vars==button1) {
gotoAndPlay(20);
} else if (vars==button2) {
gotoAndPlay(351);
}
stop();
Result? It always goes to the frame 20.
But if I desactivate one button, for example the button1, doing this on the second movie:
if (vars=="button1") {
gotoAndPlay(20);
} else if (vars==button2) {
gotoAndPlay(351);
}
stop();
The both go to the frame 351.
I´ve also tried this syntaxis on the buttons:
on (release) {
loadMovie("dos.swf?vars=button1", 1);
}
and so on. Then everything goes fine; both buttons load the movie at the desired frame, but doing this way, when I load movie 2 from button 1 is different than if I load the same movie from a different button, so each button loads te movie even if it´s the same movie and is already cached.
Result? Each button must load the movie even if the movie as been previously loaded from anothe button. In the temporary internet files, the same movie appears as different movies depending on the button that loaded it.
dos.swf
dos.swf?vars=button1
dos.swf?vars=button2
So... any ideas? I´m really really desesperated, and in a very hurry!!! :´-(((
Thanks in advance,
Jubal
Dynamically Loading Movies Into Movies With Variables
This might be a kinda tough one. I'll explain the best that I know how.
I want to load jpg images into a movie/button (movie clip with a button instance inside of it with another movie clip inside the button), but I need to do it dynamically.
I was thinking about naming all of the files the same but just change the numbering at the end. Then I can just use an i value to obtain the next file.
Code:
for(i=1;i<5;i++){
loadMovie("something"+i+".jpg","mv_btn_"+i)
}
so, basically I have 5 buttons with 5 images to import. The buttons already have the proper numbers on them, I just need to import the clips into the corresponding button.
Solution To Load Delay When Dynamically Loading Images - JPGS & GIFS?
Hi all, just set up an online interactive which dynamically loads images (JPEGS & GIFS) and text as required.
I set it up like this so that the client can easily replace text or images in future without needing to mess with the Flash files. Here's a code example:
loadMovie("image1.jpg", _root.bg.Background);
holder._x = 500;
I've made the images as small as they can be, but when testing it, I see that there is still a delay as each image is being called up - in some instances long enough for the user to wonder if it's working or not.
I also notice that when certain images are dynamically loaded for a second or third time, they are called again from the server - the file that was loaded already is not used.
Is there a way to pre-load all these images to prevent these issues?
Or any other solution or ideas would be helpful
Load Movies/hide Movies
Level 10 is my menu.
Level 2 thru 8 are movies I want to load, depending on the menu choice at level 10.
Level 0 is the main movie.
Part One:
I want to Load Movie X on level 5. When I'm done reading Movie X, I want to click on another menu pick (on menu level 10) and have whatever menu choice clicked on appear WHILE Movie X on level 5 dissappears.
The problem is that I don't THINK I want to use UNLOAD movie - I just want it to "turn invisible". And do this throughout the user experience when called upon. Any ideas?
Part Two: On loadmovie can you call a specific frame?
I tried this:
on (release)
loadMovieNum ("pres1.0.swf", 3);
gotoAndPlay (2);
To no avail. Any ideas here?
Thanks a bundle.
Movies Within Movies (load) URGERNT
Hello.
Please, please, please help me.
I have movies which need to work inside movies.
I currently have the maintimline with a blank movie clip (mtClip) in it. When this needs to play inside the main timeline, it does so nicely with the script:
_.root.mtClip.loadMovie("newMovie1.swf");
That works fine.
However, when in newMovie1.swf, I need to make available another new movie. So here I have placed another blank Movie Clip instance name "moreClip". It does not work though. I have placed the script:
_.root.moreClip.loadMovie("newMovie2.swf);
This works when previewsing NewMovie1, but not when viewing the original movie.
I understand that this has something to do with levels/parents or something.
CAN SOMEONE PLEASE PLEASE EXPLAIN. I NEED THIS DONE ASAP.
ALL YOUR COMMENTS ARE HUGELY APPRECIATED!!!!
Regards,
TCM
Load Load External Swf Movies And Paly At Same Time?
Hi. I am new here and i am desperate to have my problem solved please. I have an html page with 2 swf movies that should be playing at the same time (one shows logo of a company and the other shows at the same time the company's products). the problem is althought they are synchronized when played on my pc, when loading via internet they doen't play at same time because one is much bigger than the other and takes more time to load and play. so i thought of making a dummy swf movie that loads both swf movies and make them play at same time. Can anyone help me with the script needed for this? or is there a script that can be used on one movie and make it play only when the other one is fully loaded? please help !! thanks in advance!
My Variables Load With LoadVars...how Do I Execute A Loop To Assign Variables?
I have 52 (one for each week) duplicated MCs, a loadVars(), and variables "sermonTitle" and "airDate," which I'm trying to assign with the following:
this.airDate=_root.loadContent["airDate" + sermonDate];
this.sermonTitle=_root.loadContent["sermonTitle" + sermonDate];
which is placed in an onClipEvent (enterFrame) handler of the button which is duped . The vars load when I click Video > 2001.
The vars loaded have values named sermonTitle1, sermonTitle2, etc. and the same for airDate. The numbers attached reference the sermonDate which has already been assigned though my duplicateMovieclip loop:
num = 52;
ystart = b._y
n = 1;
while (n <= num) {
duplicateMovieClip("b", "b" + n, n);
setProperty("b" + n, _y, ystart + n*17);
this["b"+n].sermonDate = n ;
trace(this["b"+n].sermonDate);
n = n + 1;
}
I've tried attaching the assign code to the dupMovieClip loop:
num = 52;
ystart = b._y
n = 1;
while (n <= num) {
duplicateMovieClip("b", "b" + n, n);
setProperty("b" + n, _y, ystart + n*17);
this["b"+n].sermonDate = n ;
this["b"+n].airDate = "airDate" + n;
this["b"+n].sermonTitle = "sermonTitle" + n;
trace(this["b"+n].sermonDate);
n = n + 1;
}
setProperty("b", _visible, 0);
and it works - as far as assigning the correct value to the correct button, but it does not associate the loaded vars with them.
The SWF is VERY sluggish, though, which makes me think the onclipEvent is not the best way of assigning vars. I get the trace(this) showing all of the variables loading, so I know that's not the problem.
Does anyone know how to best assign these? I have been advised to use a loop for it. How would I go about executing a loop for this, as I will have navs loading in different text files - Thanks
Link to SWF:
HERE
|