XML Loading Variable Location?

Jun 15, 2010

I have been working with xml sheets to load a menu and in order to load a submenu or to go to a submenu of a submenu, I was wondering if it is possible to load a variable location for an xml.

For example, if I had the variable xmllocation which was a string that said where in an xml a certain menu was, is it possible to use the xmllocation variable for something like this:

( if xml.xmllocation.length() > 0 ) do something;

whenever I tried messing around with it, it would actually go to look for "xmllocation" in the xml instead of check what the string is. So what I guess I am really asking is, is there a way to tell it not to be so literal?

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Using A Variable In A Location?

Mar 3, 2009

I need to use a variable name in a location, for example:

aS_mc.aScreen_mc.aScroller_mc.a1.gotoAndStop(_global.aPicture);

The a1 is what I want to change, I've got a global variable that changes to a1, a2, a3, etc, on another function The global variable I'm using is _global.aChoice

So, I've been looking around, and the only thing I found that I thought my work is

aS_mc.aScreen_mc.aScroller_mc._global[a1].gotoAndStop(_global.aPicture);

But this didn't work either

View 2 Replies

ActionScript 2.0 :: Loading A Movie Into Location?

Oct 28, 2003

when loading a movie into the main timeline is there a way to tell the movie to load into the center? instead of a set x,y postion? im sure its just a few extra lines of math..

View 10 Replies

ActionScript 2.0 :: Loading External SWF Into Right Location?

Jan 4, 2005

What I am trying to do is create a movie clip that will load an external swf then control it from the _level0 movie. The problem I am running into is loading it into the right location.

Code:
duplicateMovieClip(this.option,this.menu[context+"_"+optionnumber],this.getNextHighestDepth());
trace(this.menu[context+"_"+optionnumber])
this traces out "undefined"
I know this.option has been loaded correctly
I know this.menu exists as an empty movieclip
[context+"_"+optionnumber] traces out as expected

It Works fine as an attachment from library using attachMovie, if I convert that library item to an external SWF then try to duplicate the movieclip into the same location it dosnt work. Does duplicateMovieClip not support what I am trying to do? Is there another way to acomplish this?

View 11 Replies

ActionScript 2.0 :: Loading A Swf. Into A Specific Location

Mar 27, 2002

I'm trying to load my movie into a specific location...I got the code to load it properly, and now I need to know how to load it to specific X and Y positions.

View 3 Replies

Professional :: Loading A Flv Video From A Remote Location?

Jul 16, 2010

I'm trying to access a flv file on a remote server from swf. It works perfectly from my local machine going to the remote folder. But, when I upload it to my web host, it doesn't load the remote flv. I'm guessing there's some kind of permission issue on my web host. I have a crossdomain.xml file in the root dir with the following:

<?xml version="1.0" encoding="utf-8"?><cross-domain-policy><allow-access-from domain="*" /> </cross-domain-policy>

View 1 Replies

ActionScript 3.0 :: Loading SWF File In XML - Loses Location?

Nov 24, 2009

So I have a .swf file that loads in xml and such. Now I want to have a flash file load that into it, but when I do the loaded .swf loses the location of its files to load?

So.
File A - the loader
File B - load swf
File C - load swf xml file

All sit in the same folder
if I open file B, it reads file C no problem
if I open A that loads in B, it loses location of C and it dont load the xml? I am on access network files.

View 0 Replies

ActionScript 2.0 :: Loading The Location Of An XML File Via FlashVars?

Sep 29, 2007

Quick question here about variables in flash..Im loading the location of an XML file via FlashVars in my html document (I'm using the SWFObject to render the flash by the way). Anyhow I can pick up the variable on my root timeline and have it displaying in a dynamic text box but I need to get it inside a movieclip which is where my code is for the xml and I can't work out how to get the variable from the root timeline to the movieclip?

View 1 Replies

ActionScript 2.0 :: Loading A Dynamic Location By Html Var?

Aug 20, 2008

i have some problem...how can i load location from var in html?this is the html code that load the flash

Code:
<div align="center" id="flashcontent" class="virtual">This content requires <a href="http://www.adobe.com/go/getflashplayer/">Adobe Flash Player 9</a> and a browser with

[code]......

View 2 Replies

ActionScript 2.0 :: Loading A Movie From Another Location Within A Flash Document?

Jun 27, 2004

How do I go about loading a movie from another location within a flash document?

View 14 Replies

Actionscript 2 - System - Security.loadPolicyFile Not Loading From The Custom Location (Flash)

Nov 8, 2010

Specifically, the developer of a web service I'm trying to call has installed a cross-domain policy file on his server at:[URL] So, in my SWF, I'm calling this:

[Code]....

Of course, it's not there, so it fails to load. (If the developer could install the file at the root, I wouldn't have this problem, so I wouldn't be using System.security.loadPolicyFile in the first place). It's not just in the IDE - when I test the app in Firefox with Firebug, I can see that the SWF is attempting to load the policy file from [URL].

I've stripped down the SWF so that it does nothing else but attempt to load the policy file from the subdirectory, and it still fails. So, I don't think this has to do with any idiosyncrasies of my specific app. Bottom line - does the System.security.loadPolicyFile work? Is there something else I need to do in conjunction with that call to get it to work? Or, is there something I'm doing wrong?

View 1 Replies

ActionScript 1/2 :: Make An Object Tween From Its Starting Location To The Location Of A Mouse Click?

Apr 27, 2009

I am trying to make an object tween from its starting location to the location of a mouse click. I have a script, but it has a very annoying ease to it.I would LIKE the object to mantain a certain speed during while traveling from its starting location to the mouse click location.

View 16 Replies

Professional :: Button File Opens In Saved Location / But Won't Open In New Location

Aug 21, 2011

I created a simple button that displays an error messeage: "error opening 'url" when I test the movie, but does play and opens in browser after publishing. However, it won't open in the browser in a different location. I pasted the html code in a web page but it doesn't work there nor opens in the browser in a differnet location from where it was originally published and saved. Why is that?

View 13 Replies

ActionScript 2.0 :: FMX:Loading External Variable From Text Into Variable

Sep 8, 2003

I want to load an external variable called name from a text file into a local variable in flash called my_str...here's what I have:

var loadText = new loadVars();
loadText.onLoad = function(success) {
if (success) {

[Code]....

I need to have the variable my_str available outside the function..

View 3 Replies

ActionScript 2.0 :: Move MC From One Location (x / Y) To Another Location

Feb 16, 2005

How can I move my MC from one location (x, y) to another location (x1, y1) wirh action script..?.. and I would like to have my motion tween rounded to (x,y) so it will look sharp.

View 8 Replies

ActionScript 3.0 :: Pass Variable From An Swf To A Loading?

Feb 12, 2010

I have a situation where I allow the user to select the section of the site that they wish to go to. At the moment, I have a separate SWF for each section of the site, but I was wondering if it is possible to create 1 swf file and based on variables that are passed, it would load different data into the swf.

What I need to know how to do, is to pass those variables to the loading swf at run time so that it loads the correct items into the swf.

View 2 Replies

ActionScript 3.0 :: Loading XML - Waiting For Variable To Be Set?

Mar 13, 2010

The problem I have is that the amount of elements in my XML is variable, and I need to initially place objects on the stage depending on the data in the XML file. Both how many objects to place and their positions are in the XML file. I can't get it to wait until it's looked at the XML file before continuing through my code, obviously erroring when it doesn't know how many there are. It gets through all my code before finally coming back to run the function to grab the XML. I have tried putting setting a variable within the function, and a while loop outside the function waiting to that variable to be set, but it never happens if I do it this way.

Code:
var items:Array = new Array();
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, handleXMLLoaded);
loader.load(new URLRequest("[URL]"));
function handleXMLLoaded(e:Event):void {
[Code] .....

View 2 Replies

ActionScript 3.0 :: Loading Variable Dynamically Through XML

Jul 22, 2009

How to add a child to the stage dynamically? I can get a child to add to the stage but not using dynamic variables. Is it possible?
Example:
var firstRoundWinner:String = "Redsquare";
var mc:MovieClip = new firstRoundWinner();
// want it to say = new RedsquareaddChild(mc);
With Redsquare as one of my movieclips and the linkage is working. I can add it if I hard code it. But I want to load the variable dynamically through xml.

View 1 Replies

ActionScript 3.0 :: Loading A SWF And Accessing A Variable?

Feb 8, 2012

Here is my code in my main timeline:

var loadit = new Loader();
loadit.unload();
loadit.contentLoaderInfo.addEventListener(Event.COMPLETE,mcLoaded);

[Code]....

View 11 Replies

Actionscript 3 :: Loading A SWC Asset By Variable Name?

May 23, 2011

I am trying to load assets from an SWC into a SWF at compile time, in as3. I'm getting the information about which assets to load from a JSON file. I can do so statically, but when I try to define the names dynamically, I'm running into problems. So for example I can do this:onemech[+ tmpObj.id] = new mech3 as MovieClip;And it loads the asset named mech3. But what I would like to be able to do is something like

var mechtype:String = "mech" + mechtypenumber;
onemech[+ tmpObj.id] = new mechtype as MovieClip;

Obviously, that doesn't work.I looked around a bit and I found this here, which seems to be angling toward what I need, but I can't figure out how to apply what's said there to my specific situation.

View 1 Replies

ActionScript 2.0 :: Loading A Variable From URL String?

May 22, 2007

Im trying to take a variable from a php file and insert in into action script. What I'd like to do is take the value of a url for example [URL]and insert it into Action Script to dynamically load a movie inside a main movie.

_root.currMovie = "MYVARIABLENAMEHERE";
container.loadMovie(_root.currMovie+".swf");
stop();

Using Flash 8 with AS 2.0

View 4 Replies

ActionScript 3.0 :: Loading An External .txt Into A Variable?

Sep 20, 2009

I'm creating part of my code to only be executed if a textfile on my server says it's okay. textfile.txt = "Okay=1 or 0"

I can get it to display in a textfield, but I cannot figure out how to simply put it in a variable for further actionscripting..

So how do I get the text from my external file, into a variable:string?

View 6 Replies

ActionScript 3.0 :: Loading Movieclips With The Same Variable?

Apr 11, 2010

I have this function that loads swfs dynamically using the same variable

var Xpos:Number = 420;
var Ypos: Number = 155;
var loader:Loader = new Loader();

[Code].....

I want to use the same idea for movieclips that I have in my library They are already imported for as.30, but I can't figure how to dynamically place them and take them out of the stage using the same variable.

View 4 Replies

ActionScript 3.0 :: Loading A Filepath Variable From Php Then The File

Jul 9, 2009

I'm loading a filepath variable from a php script that simply returns something like [URL] This works fine, apart from the last bit which reads the text file where it throws an error: Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file: However it works fine if I replace the variable with the actual filepath loadit.load(new URLRequest(filename)); to loadit.load(new URLRequest(C:/wamp/www/text/o/blah.txt);

[Code]...

View 13 Replies

ActionScript 3.0 :: XML Global Variable - Loading Data For Later Use

Aug 30, 2011

The XMLdata doesn't seem to be global when this code is executed and I am not sure why. I want to load the data but it may not be used to later by the user.

//Load XML
var xmlData:XML = new XML();
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("XML/organtext.xml"));
trace("loading xml from XML/organtext.xml");
function LoadXML(e:Event):void {
trace("XML Loading Complete");
xmlData = new XML (xmlLoader.data);
}

View 14 Replies

Professional :: Making And Loading Variable Classes

Feb 13, 2012

AS3 says you need to load variables into a class?my variables look like this... (the whole point of playing around with variables was that if I had to make a change I could access one place and change them but now I realse that I can't access or call them outside the movie clip they are in.[code] The Wholesale price. A wholesaler is usually a big shed where goods are stored.

View 7 Replies

ActionScript 3.0 :: Loading Sound Variable From Within Function?

Jan 29, 2009

I have made a sound sequencer where users can record their own sounds and add them to the sequencer, my problem is that I want to be able to change the sounds during the running of the program. Here is the simplified code for importing and loading a sound in ready to be played.

var BASS:String = "bass.mp3";
function bassURL() {
var bass:Sound=new Sound(new URLRequest(BASS));
}

[Code].....

The reason I put the URLRequest and Sound in a seperate function is because I want to be able to change the var BASS to different mp3's during the program. Obviously when I run this it tells me that it can't find 'bass' because its a var inside another function. How can i get it to refer to 'var bass' inside bassURL?

View 0 Replies

ActionScript 3.0 :: Loading Variable From Text File

Feb 1, 2011

figuring out my problem other than my lack of knowledge in action scripting? My issue is I am trying to load a variable from a text file, I am able to load the variable with in the function but I cannot for the life of me figure out how to get it out of the function.

[Code]....

View 9 Replies

ActionScript 2.0 :: Loading External Text That's Not A Variable

Dec 23, 2004

I'm working on a project that involves pulling a number from a text file on a remote server. I am familiar with the intricacies of loadVars and loadVariables, but in this particular case, the text file only contains a number. It is not preceeded by a variable name or anything like that. It is just: 40. Is there a way to pull this into flash without a variable name so I can display it in a dynamic text field?

View 6 Replies

ActionScript 2.0 :: FMX -Loading External Text Into Variable?

Aug 6, 2003

What is the best method to load external text into a variable, not directly into a text field but a variable that is going to be used later

View 14 Replies







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