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




Symbol Path And Name From Variable



Hello
Imagine that I have a dynamic textbox named textbox1 inside a movie symbol named main placed at root level.

To change the textbox text I would do this:

PHP Code:


_root.main.textbox1.text = "My text" 



If I got the symbol name from a variable I would do this:

PHP Code:


Var SymbolVariable = "textbox1"
_root.main[SymbolVariable].text = "My text" 



But what if I got both symbol name and symbol path from variables?
I tried this way but it doesn’t work

PHP Code:


Var SymbolPathAndName = "main.textbox1"
_root[SymbolPathAndName].text = "My text" 



Can someone show me a way to make this work?

Thanks



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 06-13-2007, 02:09 AM


View Complete Forum Thread with Replies

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

Using Eval Function And Variable In A Path (target Path)
Hello,

I have to reprogram some of my website and it calls to conjugate strings in a way that's beyond my understanding. Please help me with some suggestions. Kind regards.

the original code is:

code:
if (_global.useCount<10) {
//hide
var diff = 10-_global.useCount;
for (diff; diff>0; diff--) {
eval(String(11-diff))._visible = false;
}
}

There are buttons named 1 to 10 and this turns off the ones that are not used. Now I want to nest those buttons in subclip "buttonsRow", instead of having them on main timeline. How do I rewrite that code to make it work with new path?

I have already tried the "associative array" method, but it don't really know how to pack the whole eval function in there. I've tried many combinations, like:

code:
this.buttonRow[eval(String(11-diff))]_visible = false;
//or
this.buttonRow["eval(String(11-diff))"]_visible = false;
//or
buttonRow[eval(String(11-diff))]._visible = false;
//or
buttonRow["eval(String(11-diff))"]._visible = false;
//or
buttonRow[eval(11-diff)]._visible = false;
// or
buttonRow[8]._visible = false;
//the last one at least turns off button 8, lol

Some of those return syntax error and some just don't work. Anyone have any ideas? Thank you again.

Attaching A Symbol To A Path Using AS 3.0?
Is there a way to attach a symbol to a guided path in actionscript itself? for attaching multiple symbols to the path to be played at once?

Or is it better to use coordinates to send them on a path?

Attaching A Symbol To The Cursor On A Path
I'm thinking this will involve some actionscript so I'm posting here.

I'm working on the menu for a site. Right now it's simple - text links with a seperating black Line down the right side.

link 1 **|
link 2 **| <-- Line
...**** ***|
link 20 |

What I want to do is this: have a small graphic (ie. an arrow) that can move vertically up and down the seperating line shown above, according to the users mouse position vertically. It can't move horizontal in any way though, it needs to be restricted to that up/down path.
If a link is visited, that's the new default position for the arrow when the user's mouse leaves the menu. On load, the arrow will sit at the first link.
When the user moves the mouse into the menu again, the arrow needs a small one second delay while it moves to the vertical position of their mouse.

I know basic Flash 5, but haven't used it in a long time.
Any help, samples, or tutorials would _very_ much appreciated.

TIA.

Make A Symbol Folow A Path
[Flash MX]

How can I make a symbol to folow a path? Something like drawing a line with the pen tool and then make a circel object witch folows the line.

Graphic Symbol, Same Path, Diff _rotation
Hello,
I have a animation that has a graphic symbol that is on the main timeline. It follows a cirtain path and is set to different rotations through out the timeline. My problem is, I have 3 other instances of this symbol that I want the user to select from that will have the same path but different rotation schemes. I dont know how to accomplish this, it should be simple but I cant do it. Been trying different approaches for days without success.

I tried changing to a moving clip, layering all symbols on each other and have the user (via radio button) change the _visible property, but i couldnt get that to work either.

Everytime my sybol enteres a new keyframe it defaults.

using flash professional 8.

Please help!!!!!!!!!!!! Any Ideas

Trying To Change A Movie Clip Symbol Mid-guide Path
Hi:
I have a movie clip that follows a guide path. I have been trying to make it change to a different color on an event by puting in a gotoAndPlay to a different frame on the movie clip symbol's timeline.
Then I use the coordinate location of the the symbol to trigger the change of frame on the symbol's timeline. The trouble is the movie clip freezes at the coordinate location. Can anyone point me to an example that might help me figger out what I am doing wrong?

Mark

Variable Path Name --> Path=_root
instName="inst1";
path="_root";

Element.prototype.setVisible = function(){
[path+"."+instName]._visible=true;
}

I am trying to build a variable path to an instance. Normally I would do something like this[var]._x, but this doesn't work with _root.

Any ideas?

Variable Take On Content Of A Root Variable And Not Its Path - Simple Please Help
Hi there ok my brain has died and fallen off somewhere , what i am trying to do is this:


l=0

l++


_root.advert= "_root.var" + l ;

then i have a text box on stage , dynamic, etc var: _root.advert
, vars are stored in a text file , vars are called, var1, var2 etc , text box needs to display variable contents, but at the moment it just says "_root.var1" etc and not the content s of var1 this is very simple problem but my brains dead please help.

-arran

Sting Variable To Mc Path - VARIABLE TYPES
Hey all Im building a variable like this

var m = "_root.subNav.subNav" + i;

When I do a trace to find the var type it comes back as a string so my function wont execute thinking it is a string and not a path. Does anyone know how to fix this or change the variable type on the fly in AS 1.0? Ive tried:

var m =eval( "_root.subNav.subNav" + i);

But that came back undefined....
Thanks.

[CS3] AS2 - Use Variable As A Symbol Name?
Hi All,

I'm not sure if what i'm trying to do is possible so I do apologise if it sounds like total madness!

I have 6 items in an array which get reordered, the first 3 being the "correct" items each time.

What i'm trying to do is make the corresponding item you click on disappear if it's a correct item, so at the moment I have the following:

moveitem = "item";
Each item is named item1, item2 etc so i've definied this as the generic value of the variable.

moveitem = (moveitem +(item[1]));
This code is applied once the item is clicked and deemed correct, and adds the number from the array to the end of the variable to make it match the symbol name i'm trying to move.

Now what I don't know how to do is get the data in this variable to refer to a symbol name on the stage, any help would be massively appreciated!

Hyphen Symbol In Variable?
I am trying to pass a variable, but I can not get it to work.


Code:
value = 1-2;
trace(value);


I want it to trace 1 (dash) 2, not 1 (minus) 2. I know this is simple, but can i get some hints.

Also, the source of the varibles is going to come from a external text file, I don't know if that makes a difference.

Thanks

Searching A Variable For A Symbol
Hi everybody

I'm trying to search a textbox for certain characters that if they are present, the user is prompted to remove them, before the form can be submitted.

I can successfully check for one character at a time but instead of writing 15 if statements, i want to pack it all in one if statement, and just separate it with the logical OR operator. But, for some reason it's not working. Even when none of the characters are in the text box, it still acts like there are. here's my line of code, or part of it:


Code:
} else if (linkVar.text.indexOf(""") == -1 || linkVar.text.indexOf("/") == -1 || linkVar.text.indexOf(":") == -1 || linkVar.text.indexOf("*") == -1 || linkVar.text.indexOf("?") == -1 || linkVar.text.indexOf(""") == -1 || linkVar.text.indexOf("<") == -1 || linkVar.text.indexOf(">") == -1 || linkVar.text.indexOf("|") == -1) {
trace("Filename can't include these characters: /, , :, *, ?, ", <, >, or |.");
Selection.setFocus(linkVar);


If anyone can help, I love them.

thanks

How Can I Pull A Variable Value From A Movie Symbol?
I am using some checkboxes in my movie. The checkboxes are a seprate movie I imported as a symbol. When the user selects a checkbox, it sets a variable to reflect the selection. I want to use that variable in the same frame the checkbox symbol resides but I can't pass it.

It is not set as a local variable either. I am a total newbie when it comes to using variables in flash.

Find Instance Of Symbol Using Variable
hi, can anyone help me with this?

I need to find an instance of a symbol on the stage uding actionscript, but I don't know the intance name. The instance name is contained in a variable.

clpMovie1.varName._property doesn't work

so can anyone tell me if there's anyway I can do this?

thanks

Variable Path
hello
i have a movie clip with only one frame in it and it has a dynamic text box whose variable name is t1.The main timeline also has one frame which contains instance of that movie clip named as mc1 and also has another dynamic text box named v.in that frame i had given
v=_root.mc1.t1 to display the value of t1 in MC in the text box v.I had also tried v=_level0.mc1.t1.But noone displays the values in the textbox v.

whats the problem in that

bye
geethanandh

How Can I Use A Variable In A Path
i have a loop counting i up to the number of objects i want to scale. Is it possible to use a variable that's based upon a prefix and the number i as suffix in the path to object that is supposed to be scaled.

here's my code(variable(thing) is ok path is not working):

thing = "obj" add i;
// here is something wrong
_parent.thing._width = newsize;
_parent.thing._height = newsize;

thanks for your help!

Path To Variable
I want to set a path by having a variable dictate the path... having problems with the syntax:

dynamicNum = _root.somevar;

//this is the path depending on the dynamicNum brought back the path will change. not sure if this is the way to concat the dynamicNum...
well it must not becuz it does not work any ideas on the syntax?


_root.screenAtty + dynamicNum.popuptext.click=0;

Path As Variable
Objective
What I am trying to achieve is this. 20 buttons (dynamically generated). Each button displaying an external jpg which it loads into a picture viewer (this I have achieved). On clicking each button information about each of the pictures is loaded into a textfield from an external txt file (this I cannot achieve)

What I am Doing
I am loading 20 variables “picinfo1” to “picinfo20” from an external txt file “myData.txt”

Each of the variables contains text such as “my picture one” etc

I am dynamically generating buttons (within an mc) based on the number of variables in the txt file ie. 20

I have a textfield component called “textViewer”

If within the original button if I add the code _root.textViewer.text = picinfo1, the textViewer is populated by information stored in that variable is (obviously all the buttons display the information stored in that particular variable)

Using the looping function that I have to dynamically create the buttons I have a variable “infoCount”

When I add the following code
_root.textViewer.text = “_root.picinfo”+ infoCount - the text field just displays _root.picinfo1 , _root.picinfo2, _root.picinfo3 etc but NOT the information stored in those variables

It seems that it is being interpreted as a string NOT as a path. Is there any way that I can make Flash recognise “_root.picinfo”+ infoCount – as a path NOT a string

Sorry if this is a little confusing

paul

Using A Variable With A Path - Help
Hi there.

I know how to use a variable to reference an instance on the same timeline, like this (variable is inState):

this[inState].gotoAndPlay("rollOut");


but how would it work if i had to reference something along a path? would it be like this?:

this[_parent.InstanceName.inState].gotoAndPlay("rollOut");

Kinda confused! any help appreciated.

thanx!

S

[CS3] Variable In Path
Hi I want to do something like the following code but it doesn't work:


Code:
var page = "present" ;

mainframe.page.gotoAndPlay(2) ;


mainframe is a MovieClip object and so is present.

I want to be able the change the variable so I can play different movies/pages

Variable Path?
Hi guys, i need some hellp...
Lets say i have a variable on the _root level, in the first frame

_root.a = 0;
trace(_root.a);

This will output 0.
Now in the same frame i have a moviclip (movie_a) and within that a nother movie clip (movie_b)
if i put the following code in movie_b

trace(_root.a);

i get Undefined as my output...
Can anyone please help me in this matter?
Thank you
~Gabor

Using A Variable In A Path
I'm curious why this doesn't work.


ActionScript Code:
var whereTo = _global.addressDestination;
addressSubmit.onPress = function(){
trace(_global.addressDestination); // traces address_1_txt which is correct
_root.front_mc.whereTo.text = myAddText.text;
}

whereTo traces, so why doesn't it work?

Thanks!

Variable Within Path And More -please Help
something's fishy here. guess i'm seeing not the right path after staring at it too long:

i'm having some working functions that load external pics.
everything works but now i need to convert the filenames of the images into variables.

loadImages(thumbs, "images/pic14.jpg", 76.2, 266.4);

works. BUT


ActionScript Code:
picname = "pic14";
    loadImages(thumbs, "images/[b]picname[/b].jpg", 76.2, 266.4);

not! what am i doing wrong? i tried all [] {} and whatnot....
do i need to define the variable as expression? i'm stuck.
please help!

Put A Variable In A Path ?
Hello all,

I cant figure out how to out a variable in a path.

these ares the "fixed" paths i have now

_root.alpha[var1 + "_movieclip"].label
_root.betas[var1 + "_movieclip"].label


What i want is to replace "alpha" and "betas" by a variable "var2"

any help is welcome,

Regards,
Peter

Using A Variable In A Path
I'm curious why this doesn't work.


ActionScript Code:
var whereTo = _global.addressDestination;addressSubmit.onPress = function(){    trace(_global.addressDestination); // traces address_1_txt which is correct   _root.front_mc.whereTo.text = myAddText.text;}


whereTo traces, so why doesn't it work?

Thanks!

Using A Variable In A Path?
Hi people,

I'm currently kinda stuck on an app Im developing.

I want to use a variable within a path.

Lets say my var's name is "i" and it consists of a number that will be changed.

So its basically var i = 0 and in a loop it says i++

Now I want to target this var in a path.

Lets say app."textfield"+i.text = "test"

That actionscript is wrong, but it's there to give you an idea of what I'm trying to accomplish.

So basically: how do I target an object with a variable path?

Need To Add Variable To Path Name...
So I have a button that occurs throughout the entire movie on the main timeline. I'm declaring a variable on each frame, so if you hit that button on that frame, it should take that variable and use it in the path to something I wanted turned on via _alpha = 100.

So, I want it to be something like:

on (release)(
_root.movieContainer. + "The variable" +.thingToTurnOn._alpha = 100;
)

So, I've never done this before, and I don't know where to begin, I just know that I want that variable I declared on the main timeline to be used in that path when the button is clicked.

Xml Path As Variable?
I am trying to create an xml based site navigation that will drill down to an infinite number of xml levels. I have tried to send an xml path as a variable with the currently selected menu item but I doesn't seem to work. Here is my code, it seems as though it should work, but it does not. Any suggestions?


Code:
var nodeList = [];

var xmlSource:XML = new XML();
xmlSource.onLoad = function(success:Boolean):Void {
if (success) {
xmlRoot = xmlSource.firstChild;
xmlnodes = xmlRoot.childNodes;
total = xmlnodes.length;

for (i=0; i<total; i++) {
nodesHolder.attachMovie("node","node"+i,i);
nodeList[i] = nodesHolder["node"+i];
nodeList[i].xmlRoot = xmlnodes[i].firstChild;
trace(nodeList[i]. xmlRoot);
nodeList[i].name.autoSize = true;
nodeList[i].name.text = xmlnodes.attributes.name;
nodeList[i].onRelease = function() {
showCurrent(nodeList[i]);
};
}
resetLayout();
} else {
trace("XML Not Loaded!");
}
};
xmlSource.ignoreWhite = true;
xmlSource.load("nodes.xml");

function showCurrent(current) {
trace("Showing Current Node: "+current.xml);
currentCenterX = 0;
currentCenterY = 0;
xmlnodes = current.xmlRoot.childNodes;
total = xmlnodes.length;
trace(total);
nodeList = [];
menuItems = total;
angle = ((360/menuItems)*Math.PI/180);
radius = 250;
for (k=0; k<total; k++) {
current.attachMovie("node","node"+k,k);
nodeList[k] = current["node"+k];
nodeList[k].xmlRoot = xmlNodes[k];
nodeList[k]._alpha = 100;
nodeList[k]._x = Math.cos(angle*k-45)*(radius);
nodeList[k]._y = Math.sin(angle*k-45)*(radius);
}
}

Using A Variable In A Path
I'm curious why this doesn't work.


ActionScript Code:
var whereTo = _global.addressDestination;addressSubmit.onPress = function(){    trace(_global.addressDestination); // traces address_1_txt which is correct   _root.front_mc.whereTo.text = myAddText.text;}


whereTo traces, so why doesn't it work?

Thanks!

Path & Variable
I have been trying different ways to put variable into a 'do' sentence (the variable is a path), but I haven't been able to do it... here's the AS Code... Anyone could give a little help with that.


ActionScript Code:
do {
      u = 0;
      nombre = new Array();
      chain = "nombre" + u;
      ruta = "colector." + chain;
      this.ruta.text = aNombre[u]; //the problem
      u = u + 1;
               }while (u == vTotal)


TnX a lot..

Using Variable Within Path?
I want to set a path by having a variable dictate the path... having problems with the syntax:

dynamicNum = _root.somevar;

//this is the path depending on the dynamicNum brought back the path will change. not sure if this is the way to concat the dynamicNum...
well it must not becuz it does not work any ideas on the syntax?


_root.screenAtty + dynamicNum.popuptext.click=0;

Thanks.
GR

Variable In A Path
Can anyone give me some help.

Original code.


Code:


Thumbnailgrid.thumb4.thumb.loadMovie(baseurl+"images/hallimages/thumb/4.jpg");



I have added a variable to the call:


Code:


Thumbnailgrid.thumb4.thumb.loadMovie(baseurl+"images/hall/thumb/" + varx + "4.jpg");



That works fine.

How would I add a varible to:

Thumbnailgrid.thumb4.thumb

^Replace thumb4 with variable: varx



Thanks

[CS3] Accessing Variable On Root Timeline From Within A Symbol
I have a simple Boolean variable in the first frame of my root timeline that I would like to access/change from within a symbol. Can't figure it out for the life of me. I'd like to stay away from using a package if possible. Any help is much appreciated!

Variable Scope Within Movie Clip Symbol
- I have created a "new symbol" of type MovieClip, named 'tester' (with 'Export for ActionScript' as class 'tester' enabled) which contains the following code:

var val:int = 10;
function testThis():void{
trace(val);
}

- In my main timeline, I have the following code:

var t:tester = new tester();
t.testThis();

Which outputs "0" instead of 10. What am I missing in my understanding of variable scope? And what is the best way to go about solving this issue (having a movie clip with its own variables, accessible by the parent)?

Passing Variable As Path Name
Hi all,

I have four MC's, named "person1" "person2" "person3" "person4" that have a first frame action of stop();.
I also have a set of buttons, all set a variable "i" to either 1,2,3 or 4, and a variable "f" to either 5 or 6.

I then want to send this variable to the correct "person" MC so that the correct one will play, from the right place

I've tried using several methods, all along the lines of:

_root.person(i).gotoAndPlay(f)

but the variable never seems to reach its target.

Any ideas why?

Cheers,
Dongle

User A Variable For Path?
hello,

I want to do the below.

_root.step1.date

Path = step1.date

_root."Path"


Is there anyway this can be done?

Thanks

Useing A Variable For A Path?
hello,

I want to do the below.

_root.step1.date

Path = step1.date

_root."Path"


Is there anyway this can be done?

Someone gave me this idea, which is not working.

try:
path="step1.date"
_root[path]

Thanks

A Question On A 'path' Variable
Hi, i've a big question, and i hope someone of you, FlashGURU , can help me!

I can give a variable (URL encoded) from an ASP page to a FLASH movie, so
i can have dynamic text on my flashsite... i've try it, work fine!

I like to pass another variable, this time with a path (http://...) to a SWF movie.
I wish to load a movie on a level or in a target-movie, but the path to
that movie will be generated dinamically by an ASP page!

Can i do this (or something like this)?
How i can do it (obiviously without Generator, turbine or such)?

Please,probably this is a newbie question...
but i need to know!

Thank you for all your support!

Using A Variable To Set Path To Folder?
Hi

I have set two variables
Var 1 is 'imageNumber' (swf name)
Var 2 is 'SectionNumber' (folder name)

I want to use these variable to load in an swf.

The folder it looks into infulenced by 'SectionNumber' var and the movie loaded influenced by the 'imageNumber' var... but I cannot seem to get it to work!

i.e
loadMovie folder["sectionNumber"]/image["imageNumber"]+.swf

Is this possible?

Attaching MC To Variable Path
Hi

I have a number of mcs on the stage (for arguments sake "parent mcs".

Depending on which parent mc i have selected id like to attach a movie from the library (child mc) to the relevant parent mc on the stage.

so i've setup a var called parent mc:

var parentmc = "_root.parentmc"+count;

so that i can do this

parentmc.attachMovie(blahblah);

but this doesnt work because ive treated it as a string. How to i target a dynamic movieclip instance?

Simple Variable Path..
i have a 'circle_mc' movieclip inside that 'circleInside_mc' and the code on that is...


onClipEvent (enterFrame){
var test;
test = 100;
}

-------------------------------
code on _root frame 1

var c = _root.circle_mc.circleInside_mc.test;
trace(c);

------------------------------------------------

why the value is not displayed. it says undefined.

thnx!!

Path To Movieclip As A Variable
why does this not work for movieclip 'x'?

path = "_root.x";
path._visible = 0;

(or any other property of 'x')

||| O ^ | + O ¬

Variable Path Question
I am getting a little frustrated the following actionscript works but when I replace it with variables it doesn't. Anyone got any ideas??

// Create a new style sheet and LoadVars object
var myVars:LoadVars = new LoadVars();
var styles = new TextField.StyleSheet();
// Location of CSS and text files to load
var txt_url = _root.subsection+".txt";
var css_url = _root.subsection+".css";
// Load text to display and define onLoad handler
myVars.load(txt_url);
myVars.onData = function(content) {
storyText = content;
};
// Load CSS file and define onLoad handler:
styles.load(css_url);
styles.onLoad = function(ok) {
if (ok) {
// If the style sheet loaded without error,
// then assign it to the text object,
// and assign the HTML text to the text field.
anatomymov.anatomy.styleSheet = styles;
anatomymov.anatomy.text = storyText;
}
};

This one doesn't work

// Create a new style sheet and LoadVars object
var myVars:LoadVars = new LoadVars();
var styles = new TextField.StyleSheet();
// Location of CSS and text files to load
var txt_url = _root.subsection+".txt";
var css_url = _root.subsection+".css";
// Load text to display and define onLoad handler
myVars.load(txt_url);
myVars.onData = function(content) {
storyText = content;
};
// Load CSS file and define onLoad handler:
styles.load(css_url);
styles.onLoad = function(ok) {
if (ok) {
// If the style sheet loaded without error,
// then assign it to the text object,
// and assign the HTML text to the text field.
this[_root.subsection+"mov"][_root.subsection].styleSheet = styles;
this[_root.subsection+"mov"][_root.subsection].text = storyText;
}
};

LoadMovie Using A Variable Which Contains The Path?
Hi Guys

I'm trying to use the loadMovie command to load a .swf into the main timeline.

however the path is in a variable and its just not working... any ideas?

i'm currently using:
loadMovie(Variable, 2);

if i do
loadMovie("moviePath.swf", 2);

it works,

any suggestions on how to get it to work iwth a variable?

[MX04] Path To Variable?
if i have a circle MC on stage(instance name"circle") and on that MC i have:

Code:
onClipEvent (load) {
var bob = 100
}
how would i write a path to a variable? would it be:
_root.circle.bob???


thx in advance

Passing Path As A Variable
Hi there.

in class A there is a method called myMethod which accepts the argument i:Number.

I want a mehod in class B to run this method and pass a number to it.

I want to pass the path to myMethod to classB from the timeline.

The path would be _root.instanceOfclassA.myMehod.

But what dataType do I pass it as and how do I then attach the var I want to pass to it.

Thanks

Path In A Variable Syntax Help Please
Hi,
I am posting again with a hopefully better explanation as I did not get a correct answer.
Please if you are not familiar with this don't answer.

So let me start by saying if you have the name of a mc stored in a variable the way to communicate with that mc would be for example
_root[MCnameVariable]._x = 50;

This works fine if the variable contains just the name of the mc
BUT I now have a situation where I need to store the name of the mc and its parent.

If I just store the name of the parent and mc together in the variable like this
MCnameVariable = _parent._name + "." + this._name;

The _root[MCnameVariable]._x = 50; syntax will not work

what is the correct way to do this?
please help

mark

Path Problem With Variable
mailform is a php file. When i use the following script on the root it works.
When it is inside another clip it doesn't. Anyone know why?

loadVariablesNum(mailform, 0);
answer = confirm;




Here is the total script:

fscommand ("allowscale", "false");
fname1.tabIndex = 1;
telno1.tabIndex = 2;
pcode1.tabIndex = 3;
email1.tabIndex = 4;
hear1.tabIndex= 5;
comments1.tabIndex = 6;
mailform = "mailform.php";
confirm = "please wait for confirmation ..."
action = "send";
Selection.setFocus("fname");
function validate (address) {
if (address.length>=7) {
if (address.indexOf("@")>0) {
if ((address.indexOf("@")+2)<address.lastIndexOf(".") ) {
if (address.lastIndexOf(".")<(address.length-2)) {
return (true);
}
}
}
}
return (false);
}
function formcheck () {
if ((((email == null)) || (email.length<1)) || (email == "ERROR! Address not valid")) {
email = "ERROR! Address not valid";
action = "";
}
if (!validate(email)) {
email = "Address not valid";
action = "";
}
if ((((fname == null)) || (fname.length<1)) || (fname == "ERROR! Address not valid")) {
fname = "Name required";
action = "";
}
if ((((pcode == null)) || (pcode.length<1)) || (pcode == "ERROR! Postcode not valid")) {
pcode = "Postcode";
action = "";
}
if ((validate(email)) && (email != "ERROR!") && (fname != "") && (lname != "")) {
action = "send";
loadVariablesNum (mailform, 0, "POST");
gotoAndPlay ("wait");
}

if ((((hear == null)) || (hear.length<1)) || (hear == "ERROR! Entry not valid")) {
hear = "Input here";
action = "";
}
if ((((telno == null)) || (telno.length<1)) || (telno == "ERROR! Phone number not valid")) {
telno = "Phone Number required";
action = "";
}

}
stop ();

Problem In Using Variable Within Path
i'm having problem in using variable within path. On root, nc1 = c1;

this[_root.nc1] = "_root." + _root.nomecarta1;

if (_root.carta1 == _root.carta2) { this[_root.nc1].gotoAndStop(4); }


the trace resulte of:
trace(this[_root.nc1]);

is:
_root.c1


if result is correct why can't i use: this[_root.nc1].gotoAndStop(4);

this[_root.nc1] shoud be the same of _root.c1
then: _root.c1.gotoAndStop(4);


and why this does not work.

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