Both files are running on the same domain.I am simply calling a another movie within a movie using the global variable feature.Howver even hardcoding the variable _global.directionsText the import-html.swf movie returns a undefined error
Code: //Frame 1 - Actionscript from Calling Movie _global.directionsText="http://www.mysite.com/access_db/viki...ive/myHTML.txt";[code].....
If a variable is declared in a movie as global (_global). Is this variable available to a movie which loads this movie via LoadMovie()? i.e. parentMovie loads childMovie.swf
Im using loadMovie in a parent movie to load my content movies. I need the content movies to be able to access a variable set in the content movie. I've tried using global variables and can't seem to get anything going.
I've got two layers. The top layer has the header and footer graphic alongs with the scripting for the menu. The bottom layer is where the content movie is loaded into.I'm declaring the _global variable in the top layer, outside of any functions, and trying to access it from the loaded swf in the content (bottom) layer.
I'm working with three files. Main.swf which contains navigation.swf in a blankmc, empty mc called mcContent where navigation sleclected materials are loaded.
In the navigation.fla here is the code [AS]trace("now defining global"); _global.loadFile_str = strPicName; trace("global defined as"); [Code] .....
When I do a trace of loadFile_str in the first frame of monthlyreports I get a undefined. I have tried trace(loadFile_str) and trace(_global.loadFile_str). I also noticed that if I define the global on the main movie (it maintains the global variable, the navigation fla will not overwrite it).
I have an array holding 'image' and 'name' name loops fine and populates a load of movie clips underneath each other... i need for when this name is clicked to load an image in another movie clip (image name comes from the array).. the code i have works but it only pulls throught the last item of the array which points to a problem with 'i' not being carried across the functions..? that is the result of my investigation *smokes pipe*
i defined the global variable in the first frame of my file, and i can access it on other frames, however i am trying to access it within a movieclip, and flash is telling me that it is undefined. does anyone know why this could be?
I have 2 movie clips, one being loaded into a container MC via "loadMovie();"In the main movie there is a variable with no value, in the external movie there are 5 frames, each with a value to update the variable in the main movie.
IE: if on frame 1, global value = 1 / if on frame 2, global value = 2 / etc etc I'm familiar with passing variables INTO an external swf, but am stumped on how to do it the reverse way.
I'm trying to get a value from a function which is a URLLoader COMPLETE event but even with declaring variables outside of the function will not allow me to get the value out. I'm stuck.It seems that the Asynchronous nature of Flash makes it impossible to get a value out: e.g. this works:
// Initialise a URLLoader to get XML data from XML file var myFPBLoader:URLLoader = new URLLoader(); myFPBLoader.load(new URLRequest("flightPlannerBoard.xml"));
I have a movieclip on the stage, and in that clip I have a button that is supposed to turn a global variable from true to false, but the compile tells me: 1119: Access of possibly undefined property root through a reference with static type Class.
When I use this code: Code: function closeMSN(event:MouseEvent):void{ this.visible = false Stage.MSNOpen = false }
I know how to reference the movieclip itself by this, but how do I change the value of a variable on the main stage, from inside the movie clip?
i've declared global variable in the first frame of the main timeline:var cLabel:String;In the inner timeline of a MC, i use this code:stop();cLabel=this.currentLabel;but flash gave me error 1120: access of undefined property
I'm having an issue with a global variable. I'm trying to give it a value within a function and it isn't working.The variable is imageList. It's an XML List. I'm making it global so I can use it anywhere in my project. I suppose if someone has a better idea to avoid the global variable, I'm up for that too. But for now, it seems like the way to go.
Here's my .as file: package { public class MyGlobal {
[code]....
It's giving me the same same Error #1009 as above. It seems like a scope problem, but why? Shouldn't it work since it's a global variable?
defining the variable i:e frName.... outside the function it does not display anything..same time if I define same variable inside function i:e disp_fruit...it displays the name ]why?
and how can i use variable i:e frName as global var so that it can be used in any function?
I have a stackview of textfields and when I type into the text field I want it to update on each stackview "page", kind of like a global variable, maybe even using a global variable.
Can I bring in a variable (saved in a text file) using LoadVars and then make that variable accessible from anywhere in the script (i.e. make the variable a global)?
I have a button in a movie that I want to set a global variable to a new value when clicked. I want it to access a parameter of a movie clip that this same button loads onto the movie for the new global variable value. I have the final line under this button's onrelease script with something like this:
globalvariable1 = movieclip.parameter; Everything is on level 0 and I've tried prefixing everything with _root. but it didn't make a difference, the global variable still wasn't changed. I'm a newbie so don't laugh if this is a really dumb question!
here is the set up. I'm working with three files. Main.swf which contains navigation.swf in a blankmc, empty mc called mcContent where navigation sleclected materials are loaded.
In the navigation.fla here is the code [AS]trace("now defining global"); _global.loadFile_str = strPicName;
I want to load an external .swf into my main .swf, it will contain a textfield. However, in order for it to know what to put in that text field, it must pick up on a variable main.swf_global.USERENTRY now in order for my mc user_output to display _global.USERENTRY, what must I do?
I am trying to use the global variable declaration. Up to know I've been using the x coordinate of a movie clip to pass variables between different movies, and I thought it was time to learn properly! Just to get it to work, I am trying a flash file with two movies in the root. One movie defines a glabal variable on load; _global.numb = 6;
And then I am trying to just get the other to trace it on enter frame, so the code attached to the other movie (on enterframe) is... trace(numb); (And I tried trace(_global.numb) as well, but I was under the impression that you only had to define it as being a property once.). All that happens when I run the movie is nothing is traced.
I'm having a problem changing the value of a global variable.
I'm using the xml photogallery thats available on Kirupa. I have 2 movies on the main timeline: the galley movieclip and a navigation movie clip. I want the buttons in the navigation clip to change the global varable 'section' and this to be passed to the galley xml load function. So far i have this for the button:
I've set up a multi-lingual fla now where you select your language with a button on the first frame and that loads in the equivalent xml file. Now Later in my swf I'm trying to load in another swf with loadMovie but I'd like to assign conditional statements to determine what xml is loaded.for code thus far I have
//first frame var myXML:XML = new XML(); myXML.ignoreWhite = true; loadXMLfunc.onLoad = function(ok:Boolean):Void {
I define a global variable in a swf and then launch a child window which will alter the value of the global variable and I want the parent to detect that event and take specific action. How should I go about this? Can global variables launch events?
I am trying to declare a global variable, a variable that will be recognized throughout the entire site. Then I am checking for that variable with a function inside of a movieClip, that is inside of another movieClip.[code]...
I want to load an external .swf into my main .swf, it will contain a textfield. However, in order for it to know what to put in that text field, it must pick up on a variable. main.swf_global.USERENTRY now in order for my mc user_output to display _global.USERENTRY, what must I do?
I've got a Global variable here in my flash project, which is stated like this, _global.swfloaded = "home";
This variable then changes throughout the project, depending on what buttons are pushed. One example of the change is when a button labelled Classic is clicked, taking the user to the Classic page, the variable is changed like this - swfloaded = "classic";
I then have a dynamic text field with the instance name of 'output' on the stage, which I want to display the variable, the code I've used for that is - output.text = swfloaded;
The problem is the 'output' field doesn't update at all, no matter what is clicked. How I can quickly and easily get the field to update when the global variable itself is changed.
I can then access it and get to to trace from anywhere like this:[code]However...I need to to go into something being converted to a string...like this...txt.load("xml/january/1.xml");Where the Janauary is replaced with the global variable. However, everything inside the quotations is being converted to strictly text, so that txt.load("xml/monthvariable/1.xml");Literally looks for the "monthvariable" folder instead of the January Folder. How can I put a variable into a string like this, so the variable is actually the variable and not the strict text?