ActionScript 2.0 :: [MX 2004] Access _global Variables Between Domains?

Apr 6, 2005

Is there or is there not possible to access _global variables between domains? on [URL] i have index.html and index.swf. Index.swf then loads main.swf from [URL].In index.swf i have a _global variable that i want main to use. When calling for it all i get is undefined. The only way to access it is if i call for it using _parent or _root.

I have allowed the domains to communicate using

System.security.allowDomain("http://www.Domain1.com");
System.security.allowDomain("http://www.Domain2.com");

I have also put a crossdomain policy file on both servers..cross domain policys since i CAN access the variables and functions using _parent and _root...or is it?

View 7 Replies


Similar Posts:


Flex :: SWF Access Across Domains?

Nov 16, 2010

I have a SWF that contacts a php script all on the same domain. In the first case both are hosted behind the same domain and communicate with no problem. Everything is working great.However when I take the same markup that embeds the SWF and paste it on another site (using a full qualified path for the swf in both the locally hosted and remotely hosted code), the SWF no longer communicates with the php script I wrote. I added a cross domain file to my site which looks like this.

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy
SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">

[code]....

View 3 Replies

ActionScript 1/2 :: Pass Variables Between Domains?

Apr 22, 2009

So I have an SWF8 file as a player on one domain (unsecure).  It loads and plays an SWF8 from another (secure) domain.  So far so good.  Trouble is, I need the player to send variables to the files it's playing so that links in that SWF will, well, link.  I also need the player to receive some movie control commands in return.  There must be a rule or two I'm violating, because while the file plays, anything that depends on a variable is just dead.

A note:  Both files started out as SWF6.  I understand I can only do what I'm trying to with SWF8, so I went through the code and fixed the case sensitive issues and did the conversion.

View 9 Replies

ActionScript 3.0 :: Getting Error 1120: Access Of Undefined Property _global?

Aug 30, 2008

I can't understand this stuff. A global variable is a variable I can read from anywhere in the document right? if I make a mc and in the action frame I type:

_global.myVar=5;

After that in the action frame of the main timeline I try to trace the variable with this sentence:

trace (_global.myVar);

and I get this error 1120: Access of undefined property _global.It's just me or the help menu or live doc are really useless?The examples I found are not working. The definitions are not really clear etc etc

View 1 Replies

ActionScript 2.0 :: Access The _global Object, Which Was Created In The Main File?

Apr 5, 2005

Here's some background: I am working on a project in which we have one main Flash file that loads other Flash swfs into an empty movie clip within the main file.The main file instantiates a class I've made (stateManager) into a _global variable.This object keeps track of the most recent states of the other individual files so users can navigate between them all and come back to the same status they left it.Here's the issue:In the sub files, I need to access the _global object, which was created in the main file, many times so I would like to use the 'with' construct to reduce typing. However, because the 'with' statement needs an object to reference, I am unable to publish my files .I've tried adding an if-statement at the top of each file (if(_global. stateManager == undefined){ ), but this doesn't work either.I've included a portion of my code for you.

Code:
import classes.stateManager;
if (_global.stateManager==null) {
_global.stateManager = new classes.stateManager("./InitFiles/global.xml");[code]....

View 1 Replies

ActionScript 2.0 :: Accessing Variables - If-statement Has Been Activated, _global.var1 Is Still 0 When I Trace It In Frame2?

May 25, 2004

I am making a jigzaw and when all the pieces are put in the right place, another movie clip will be played.All pieces are buttons placed in different movieclips. The movieclips are then placed in scene 1.

In frame 1, I've written
_global.var1=0;

In frame 2, I've put movieclip1, and in movieclip1 I've placed button1, with the following actionscript:

on (press) {
startDrag ("_root.movieclip1");
}[code]..........

However, when the piece is in the right place, and the if-statement has been activated, _global.var1 is still 0 when I trace it in frame2.

View 3 Replies

ActionScript 2.0 :: Declare Global Variables In Mx 2004?

Mar 27, 2004

how a can i declare global variables in mx 2004? i want 2 declare a variable that can be accessed by all buttons & movie clips. i tried to put it in the main thingie (the one u find in the actions panel when you're not selecting anything)

View 3 Replies

ActionScript 2.0 :: _global Variables Disappear - "undefined" In The Trace?

Jul 2, 2009

I loaded and then trace my _global variables for three screens and they follow me fine until,. then on the the screen i have tiny bit of code:

[Code]...

Could it be the level 99 I use. I tried using 0 and it did not work? I have tried doing this for way too long,

View 0 Replies

ActionScript 2.0 :: Custom Function With Variables Not Working Using Flash MX 2004?

Nov 29, 2004

I'm using Flash MX 2004.

[Code]...

Can you please tell me why this isn't working? It takes me 10 minutes to test the movie every time and it's taking me forever to fix things. Do I have to do something else with the variable names I'm using or something?

View 2 Replies

ActionScript 2.0 :: Send Some Variables To An ASP Cgi Using The SendAndLoad() Function In Flash [MX 2004]

Aug 22, 2005

I am trying to send some variables to an ASP cgi using the sendAndLoad() function in Flash. On Frame 1 of my movie I have the following code:

[Code]...

View 1 Replies

ActionScript 2.0 :: Movie Hierarchy - Can't Access The Movieclip Using Mx 2004

Jan 26, 2004

I have a button on my main time line root and I have a movie clip that performs an animation inside that I was wondering why I can't access the movie clip with this code I am using mx 2004 [AS]on (rollover) { _root.document.mc_button.gotoAndPlay("up"); }[/AS]

View 9 Replies

ActionScript 2.0 :: _global SetInterval - Change To A "local" Function Instead Of "_global"

Sep 2, 2003

I have my setInterval that is set this way:

[Code]...

I was wondering how I might change this to a "local" function instead of "_global". I've been trying, but my syntax is either screwed up or just just plain doesn't work.

View 13 Replies

ActionScript 2.0 :: (MX 2004) - Selections To Be Made Into Variables That Can Be Concatinated When The "Go" Button Is Pressed

May 11, 2006

I have created a tool where the user makes two selections (from 2 seperate comboboxes). I want the selections to be made into variables that can be concatinated when the "Go!" button is pressed, thus taking the user to the required frame. In other words: If the user selects "3-7" years in the first combobox, and "low-medium" in the second, when they click the "Go!" button, I would like them to be taken to a frame called something like "3-7low-medium" I'm sure this is possible, but so far I've drawn a blank!

View 12 Replies

ActionScript 2.0 :: Get A Value Of _global.id Var Outside The Function?

Jan 6, 2010

i want to get a value of _global.id var outside the function. Here is the code

var xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = loadXML;[code]....

when i trace _global.id out of function it is undefined, and when i trace it in the function it gives 1, which is ok. How can i get that value out from function?

View 4 Replies

ActionScript 2.0 :: How To Return _global

Aug 5, 2004

orrect the syntax of my code:Code:firstOne = _root.content.content_group+_global.whichOne;I have 3 movieclips called content_group1, content_group2, etc. I have a button that calls this: _global.whichOne = "1";Now, how can I correct that code above so I get content_groupX?

View 3 Replies

ActionScript 2.0 :: Using _global For New Sound?

Feb 20, 2006

is that a bad thing? or does it not matter? sorry if i missed a post where this has already been cleared up eg..

[Code]....

View 3 Replies

ActionScript 2.0 :: Using _global With Functions?

Aug 28, 2008

I am using _global to declare my vars and funcs. On the whole it makes things easy for me. However, I have come up against something that I cant fix.

Code:
_global.swipeCount = function() {
if (c >= 3) {
text01_mc._visible = 0;
text02_mc._visible = 1;

[code]....

This function is called from some MCs that have a simple single-layer, timeline-tween with an action at the last frame calling this function. The problem is that _root.swipe_mc.stop(); never executes. The MC keeps playing. I can however make it _visible = false; So it is finding the correct path.

View 1 Replies

ActionScript 2.0 :: Different Between _root And _global?

Jun 4, 2009

difference between _root and _global when dealing with variables or point me in the direction of a good explaniation on the web? I feel like there is something basic I am missing. For example the other day I was working on making some scenarios. In a nut shell I was setting up dynamic text boxes where the text would changed based on what the student selected (via buttons).

When the varible was changed (by clicking the button) the text wouldn't refresh when it was a _global, but would refresh when it was _root. Everything is working fine but I've been trying to understand the "why" it works this way.

View 3 Replies

ActionScript 2.0 :: _global Good Or Bad?

Mar 4, 2004

I recently read an article about prefacing your variable w/ _global.

And I think it rocks!!!

Why is this practice taboo?

Why do so many tutorials insist you remember the scope of every movie clip?

It seems to me that memory space is memory space.

View 2 Replies

Cannot Access Child Variables?

Jul 23, 2009

The error is as follows:1119: Access of possibly undefined property shiftX through a reference with static type flash.displayisplayObject.shiftX is declared in the first line of the movie clipFirst i check to see if the child doesnt exist and if it does I access it like so:getChildByName("ball"+ccc2).shiftX)

View 4 Replies

ActionScript 3.0 :: How To Access PHP Variables

Jan 28, 2010

Here is a simple example:
Code:
<? session_start();
if(!isset($_SESSION["intro"]) { $_SESSION["intro"] = 0; }
// has the intro been played?
// code for including the swf
?>

ActionScript Code:
if(intro == 0){
myclip.gotoAndPlay(2); // play intro
intro = 1;
}else{
myclip.gotoAndPlay(24); } // skip the intro and go straight to the end

View 6 Replies

IDE :: CS5 Access To First Frame Variables From SWC?

Oct 22, 2010

I use flashIDE(CS5) to create and organize my assets for flash game. Some movieclips need to have specific params.I am typing them at a MC's first frame:

var shape :String= "circle";
var material :String = "wood";

And then make them Export as MovieClip.For AS3 coding I use Flash Builder 4. When I create new Instance of this MC and trace values I get "null". But if before trace gotoAndStop(1); typed then my values are ok ("wood", "circle").

View 1 Replies

Actionscript 3 :: Crossdomain.xml Across 3 Different Domains

Aug 6, 2011

I have

A.swf - located on sitea.com which loads B.swf

B.swf - located on siteb.com which loads some files from sitec.com

crossdomain.xml
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" to-ports="80" />
</cross-domain-policy>

I have placed the crossdomain.xml (above) file on each domain root but i still get a Security Error from sandbox when accessing A.swf

securityErrorHandler: [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048: Security sandbox violation: B.swf cannot load data from sitec.com"]

I do know that crossdomains problems are meant to be simple

View 2 Replies

Actionscript 3.0 :: SharedObject Over Different Domains

Jun 22, 2009

I am working on a project that uses SharedObject and I have a question. I've made a button that downloads a flash screensaver and at the same time also creates a SharedObject which stores a specific id for each screensaver being downloaded. When later the screensaver is installed and run, it should get the SharedObject and read the id from it. When tested locally it works perfect since both the buttons´ and the screensavers´Sharedobject are stored in the same localPath. But when the button is online and the screensaver is local the SharedObject paths don't match.

Is there a way to solve this and make the local screensaver swf read the SharedObject from the same path as the online download button has stored it's SharedObject in?

This is the relevant code in both my swfs:

var _mySo:SharedObject = SharedObject.getLocal("name", "/");

If this won't work, does anybody have another solution to my remote to local screensaver thingy??

View 1 Replies

ActionScript 2.0 :: GetURL From Different Sub Domains

Sep 9, 2007

My client's site exists on both http:// and http://www. and I have a flash navigation system on the site. All links are absolute values and work fine from the www subdomain but do not seem to work from the http:// domain. It seems strange to me as the links are absolute paths...

View 2 Replies

IDE :: Transferring Xml Data To Swf Across Domains?

Jun 21, 2009

I just recently created a news ticker using the tutorial on Kirupa; however, I have not been successful at getting my xml data to show up on the news ticker. I have my xml file stored on and my website will be stored on Savannah State University's server. I do not want to have my xml file on the same domain as my website because it will be on my school's server and they don't allow access to their server. I want to be able to update the news ticker freely.

View 5 Replies

ActionScript 2.0 :: Inserts The FIRST _global Property?

Apr 9, 2010

I have a button with a list of _global settings:

_global.practiceName = pName.text;
_global.practiceStreet = pStreet.text;
_global.practiceCity = pCity.text;[code]....

Then I have a MC with a dynamic text box with some AS:

practiceInfo.text = practiceName+' - '+practiceStreet+", "+practiceCity+", "+practiceState+" "+practiceZip+" - "+practicePhone+" - "+practiceSite;

The problem I am having is it ONLY inserts the FIRST _global property! Only the pName.text goes in. Am I missing something here?The practiceInfo.text works great if I manually state:

practiceName = "AbC";
practiceStreet = "1235 Way";

View 1 Replies

ActionScript 1/2 :: Declare _global Variable In Swf

Mar 22, 2012

I have a swf page where the external swf will load, there is any way to declare variables who work in all swf. What I am trying to do is: like a switch, with several options in which all these are listed in the main swf

View 9 Replies

ActionScript 2.0 :: Simple _global Not Working

Aug 27, 2003

This is plain and simple, why is it not working? BUTTON

[Code]...

View 7 Replies

ActionScript 3.0 :: How To Access A Supers Variables

May 19, 2010

I was wondering how and what the best way to access a supers variables.Here's an example of what I'm trying to do.

PHP Code:
public class Major { var instance:Main; public function Major() { instance = new Main(); }}public class New

[code].....

View 4 Replies







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