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








Variables Being Ignored By Movie Clip ?


I am setting some variables in the first frame of a movie thus:

FPStop = "51";
MBStop = "8";
ValuesLoaded = "OK";

On the eighth frame, a movie clip is established which plays to a frame determined by the variable FPStop (in this case 51 out of the 100 frames of the clip).

90% of the time it works fine. Every now and again though, the movie clip seems to ignore the variable and plays right up to its final frame (100).

I've tried loading the variables from an external text file but it seems to make it even more unreliable.

Anyone think what might be wrong?

I'm tearing my hair out !!!




FlashKit > Flash Help > Flash ActionScript
Posted on: 08-21-2001, 09:45 AM


View Complete Forum Thread with Replies

Sponsored Links:

Transfering Variables From One Movie Clip To An External Movie Clip.
i have two movie clips. one is supposed to recieve the value for the variable and pass it on to the other movie clip, which is called into the 1st one via the loadMovieNum() command.

I was trying to use global variables but i'm not able to get this to work because the 2nd one is tracing undefined when i use

trace(variable);

any suggestions?

View Replies !    View Related
Passing Variables From Movie Clip To Loaded Movie
I've got a movie clip which contains a button in it. This movie clip contains a few dynamic text fields and is duplicated 20 times. When clicked the button loads a movie into a specified target. Is there a way to send the movie clip's variables to the loaded movie?
Thanks very much.
-Mike

View Replies !    View Related
Variables From A Movie Clip
hey all,
i have a little problem. I'm trying to make a nice little menu, that changes depending on your selection on the menu. blah.

right the problem i'm having is:
when i have a Go button (to make your selection on the menu to go somwhere)
(which is in the main movie not the movie clip. it cant gather the variables from the movie clip.

not sure if that makes sense...
when you select somthing from the menu it sets a variable (but in the movie clip.) is there a way i can either get these variables from the movie clip and use them in the main movie or is there a way that when i make a selection in the movie clip it changes variables in the main movie???


if that makes no sense then my menu is doomed.

thankyou very much for any help.

matt

View Replies !    View Related
Variables In Movie Clip
Hello,

Into a scene I have loaded a movie clip that needs to display a number of prices which are loaded from an external file using the loadVariables command. In the movieclip are dynamic text fields with the appropriate variable names associated. If I put the loadVariables into the movieclip and export only that clip for testing ("Test Scene" while editing the clip), the prices load and show up just fine. However, they do not show up when viewing the whole movie. Everything else in the movie clip shows up just fine, but no prices.

Where do I need to put the loadVariables to be able to use the variables in the movie? Do I use a level or a target for the loadVariables? If a target, do I target the movie clip by name or by its instance name?

Other information that may or may not matter: These variables will not change during the run of the movie, but I want them to be loaded externally, so that they are easy to change when needed and integrated better into our database.

Thanks for any help,
Joe

View Replies !    View Related
Movie Clip Variables
Hello...can someone please point me in the right direction here. I am setting up variables for this menu system. I have the main nav and subnav set up, but cannot get the description boxes to change when a main button on the main nav is pressed (I haven't set up the submenus with any code for the description box yet). Can I control the other MC using the same button variables? Or do I have to use an OnClipEvent or something within the main description box MC?

http://www.blinddrop.com/testmenu/ for the zip file of the fla and to view the swf.

cheers!

View Replies !    View Related
Sent Variables To Movie Clip
Hello everyone. I'm new here and I got a question.

I've got a main Timeline. when I set a global variable here, it can not be used in a movie clip i put on another frame of the main timeline. How can I sent the variables from the main timeline to the movie clip? Please help me!

OBIT

View Replies !    View Related
Movie Clip Variables Help
Hi,

I need some help with coding movie clips to react to a variable value eg if light = 1, gotoandstop frame2 else goto and stop 1

Trouble is, the clip seems to go to frame two regardless of the variable value, and other instances just react the same as the parent symbol regardless of the condition written inside?

Anyone help??

View Replies !    View Related
Variables Within A Movie Clip - Help.
Last edited by phlop : 2005-08-07 at 06:38.
























Sorry about the delay...

Okay, I have an input field...

Instance : hex
Variable : hexValue

Basically, when a user enters a hex value into the input box, consisting of 6 digits less the # sign, I want it to automatically update a movie clip I have with that color...

Movie Clip Instance : colSet

I am using this code...

ActionScript Code:
hexColor = "0x"+hexValue;
aColor = new Color(_root.colSet);
aColor.setRGB(hexColor);
delete aColor;


How do I code it so that when 6 digits are entered into the input field it automatically updates my box... or if that is too dificult, how about when the user hits enter on the box the color is updated.

If someone could explain both ways, it would be much appreciated. Thanks.

View Replies !    View Related
Changing Variables Outside Of A Movie Clip.
Note: I probably won't come back here often so it'd be nice if you could email me your helpful responses at darknight13@home.com. Thanks!

I'm trying to make a clone of Gnat Attack (the minigame from Mario Paint where you swat flies) and I'm trying to add a score thing. I have the button for the gnat being hit inside of a movie clip, but now I can't change the score from inside the movie clip. I think that was confusing, so I'll try to explain it a different way. I have text displaying the score in the main part of the flash then I have a movie clip which includes an invisible button and a graphic. I want to keep that button inside the movie clip and increase the score variable, which is outside of the movie clip, when the button is clicked. How can I do this? Thanks in advance for your help.

View Replies !    View Related
Movie Clip Won't Recognize Variables.
On my main timeline I've got the following:

loadVariablesNum ("text.txt", 0);

On the main timeline I've inserted a Movie Clip. In this movie clip is a dynamic text box, whose variable is set to "product". That variable is one of the variables found in text.txt.

For whatever reason, the movie clip won't display the contents of that variable. It's as if it's not seeing what was loaded on the main timeline.

I tried adding inside my MC the following, but it didn't help:

product = _root.product

Can someone help me?

View Replies !    View Related
Variables In Loaded Movie Clip
Is there a way to access the variables defined in a loaded, duplicated, or attached moive from the timeline that contains it? If so how?

Thanks.

View Replies !    View Related
Load Variables From A Movie Clip
I want to load a variable defined inside a movie clip into a dynamic text box, and my text box is on the main stage... i know there is a way to load the variable, can anyone let me know what the syntax is?

I'm actually using flash mx, if that was to make a difference

thanks in advance
[Edited by chrisd9 on 06-27-2002 at 05:57 PM]

View Replies !    View Related
Sending Variables To A Movie Clip
I'm trying to make a news bar that will continue to loop no matter what else is happening so I made a movie clip called "newsbar" with a dynamtic text box. I'm going to load the variables from a text file. I can load them into the main movie but i can't send them to the "newsbar" movie clip. I'm a newbie to actionscript but i'm learning as I go so any help would be greatly appreciated.

View Replies !    View Related
Variables In Button And Movie Clip
I want to have a button and if you roll over it 'var' will be set to 1 and when you roll out I want it to equal 0. I got that far but the problem I am having is in a movie clip I have something like this...

if(var==1){
DO THIS;
}
if(var==0){
DO THIS;
}

But it doesn't work, I tried to make the variable '_global.var' but that didn't work. How do you get both the movieclip and button to recognize the variable??

View Replies !    View Related
Controlling A Movie Clip Via Variables
Please Help

I am trying to control a MC in flash with variables.

I have five different products that I want to animate in and out of the page when you click on the corresponding button.

I have created all the animating in one movie and they are seperated by frame names and stop commands (i.e. product 1 in, product 1 out, product 2 in, product 2 out and so on). And I have created five buttons inside another movie because they too have their own animations.

Both movies have been placed on the main timeline and given appropriate instances.

Now what I want to do is click on the first button and in comes the animation for the first product, then if I click on the fourth button, I want the movie to carry on the the end of the product 1 out then check where I want it to go, and go there.

As an amateur web designer I would have created five different outros for each product, but I know there must be a better way.

I think I understand the idea of using variables and have looked on the hugely helpful FX Tut's, but I still dont know how to create a variable or how to make the file check the variable then decide where to go.

Cheers in avance

aaron.bennett





Kill Flanders

View Replies !    View Related
Modifying Variables Outside The Movie Clip
Ok, I am having trouble. I am making a game where you are timed in weeks. I created a MC so that every 240 seconds it subtracts a day from this "week" variable. But the variables dosent work cauz the dynamic text box is'nt in the MC. How would you edit this remote variable from within the Movie Clip?

View Replies !    View Related
Lost Movie Clip Variables
I am having big problems with these *#@! variables. I have posted this before, (Thanks for the replies)but this is still not working.

Here is a link to the fla if you would please give it a look.
http://www.geocities.com/mr_roxberry/NewGame12a.fla

In the fla, there is 3 mc's, each has a variable(num) that changes depending on frame. The problem is that the 'prize button is either not getting the variables values or is not written to do what I need.

Thanks,
chosenson

View Replies !    View Related
Duplicate Movie Clip Variables
I have some variables in some duplicated movie clips.
you know it's easy to duplicate that's how I do:

[...]
n=1;
while (n<=4) {
name = "x" add i;
duplicateMovieClip(x, name, i);
[...]

then I would like to have this code to insert values to variables but how do I tell flash to go into the "current" movieclip's variable?
usually it's like that:

instancename.red=(i*10);
instancename.green=(i*10);
instancename.blue=(i*10);

but now?

I tried:

name.red=(i*10);
name.green=(i*10);
name.blue=(i*10);

because "name" is the string containing the current name of the new istance..... but it didn't work......
so... how?

View Replies !    View Related
Load Variables From .txt Into Movie Clip
please Help

how can i load a variable from a .txt file into a movie clip??
or a button??
i can only load it into the main timeline.

i would realy apreciate it if someone could help

View Replies !    View Related
Loading Variables Into A Movie Clip
I can't figure out how to load variables to change text into a loaded movie clip.

On a button release I have code that is similar to the following:

on(release)
{
mcPictureLoader.loadMovie("Video1.swf")
mcPictureLoader.ButtonA.AnsA = AnswerA
}


mcPictureLoader is the movie clip that loads the swf file.

ButtonA is the instance name of the movie clip in the movie where the dynamic text box is found.

AnsA is the name of the Dynamic Text Box.

AnswerA is the name of the variable that is being loaded from a text file.

AnswerA is being loaded, I've checked it with a trace function, so I know that part of it works.

Let me know if you can see anything that isn't working right here.

Thanks in advance,


--ThaSizzle

View Replies !    View Related
Declaring New Variables In A Movie Clip
i have just started to learn AS3 but i am confused on one issue, in the tutorials i have done its says that you have to declare new variables with var and declare there data type so it looks like this:


Code:
var testVar:String = "hello";
but what if you want to do things properly declare a new variable in a new movie clip? the following code works but its it "correct"?


Code:
var newClip:MovieClip = new MovieClip();
addChild(newClip);
newClip.testVar = 4;
trace(newClip.testVar);

View Replies !    View Related
Addresing A Movie Clip Using Variables
I'm triying to address a movie clip using variables can annyone help?
here's the code I'm having trouble with.
numb = 6;
vari = "_level0.but" + numb;
vari.onRelease = function() {

View Replies !    View Related
Using Variables To Control A Movie Clip
ok now i saw a post about using them to control a image heigth

but what about telling a specific clip wich frame to gotoandstop


Code:
onClipEvent (load) {
loadVariablesNum("variables.txt", 0);
loadVarsText.onLoad = function(success) {
if (this.s1 == offline)
{
status1_mc.gotoAndStop("offline");
}
else
{
status1_mc.gotoAndStop("online");
}
};
}
now this has no errors but yeilds no results any help would be greatly appriciated

View Replies !    View Related
Populate Movie Clip With Variables?
Hi all. I have some variables on my main timeline. Can I somehow open an external SWF file, pass the variables to the SWF and display those variables? Basically I'm trying to build something like the trace window, but have it available at any time.

I am able to open up an external SWF but unsure how to pass the variables and have them display.

Any ideas?

Thanks!

MA

View Replies !    View Related
Variables Within Nested Movie Clip
Hey there -- new to actionscript and having some issues...

I have variables being loaded in the main timeline of my swf, and then I need these variables to appear within a movieclip inside that main timeline (an XML has to be dynamically called based upon an external variable).

The problem is that the variable appears at the root level of the main timeline, but not within the movieclip. HELP! Example code...

First frame of main timeline (this is set in the embed code with mymovie.swf?listID=99:

newVar="quotes/quotes"+listID+".xml";

Like I said -- this shows up fine in the main timeline when I use a dynamic text box to display it, but inside the movie clip, I just get "undefined".

Thanks a bunch in advance and let me know if I need to give more info!

-PM

View Replies !    View Related
Update Variables In Movie Clip
Hi!

Is there anybody who can help me with a simple (?) problem:

I have loded a movieclip into a movie:

var mcl:MovieClipLoader = new MovieClipLoader();
mcl.loadClip("Legend_movie.swf",legend_mc);

In the main movie a variable is changed by on EnterFrame:

figure_mc.onEnterFrame = function() {
size = circle_map_mc._width;
}

The variable "size" is also used by the movie clip.

Can anybody tell me how the movie clip can be updated for each "onEnterFrame"?

At the moment the movie Clip only reads the variable "size" at the first frame...

tm

View Replies !    View Related
Loading Variables Into A Movie Clip
What am I trying to do, is make a scrolling menu.. like, with news, shows, media, links etc.. so, I have to turn it into a movie clip, before I did that though, I put dyanmic text boxes in all the boxes that are being scrolled.. So, what I need to know, is how to make mutiple .txt files and load them to their corresponding text boxes in a movie clip.. Can someone help?

View Replies !    View Related
Variables In Movie Clip Instance
Hello,

I have a problem trying to define a variable in a movie clip instance from a button in another movie clip.

Currently, I have MyMC1, and in MyMC1 I have loaded another movie MyMC2...

There is a button in MyMC1 which I want to be able to cause MyMC2 to resume play and establish a new variable. I have the part where the playhead resumes in MyMC2, but not the part about defining a new variable. The code on the button in MyMC1 is this:


Quote:




on(press){
this.MyMC2.play();
this.MyMC2.onEnterFrame = function(){
var skipcontentend:Boolean = new Boolean();
skipcontentend=true;
}
gotoAndPlay(14);
}




The playhead in MyMC2 does move forward when the button is pressed, and the playhead in MyMC1 skips to 14... however, the variable skipcontentend is not established in MyMC2.

Any help?

View Replies !    View Related
Loading Variables Into A Movie Clip
What am I trying to do, is make a scrolling menu.. like, with news, shows, media, links etc.. so, I have to turn it into a movie clip, before I did that though, I put dyanmic text boxes in all the boxes that are being scrolled.. So, what I need to know, is how to make mutiple .txt files and load them to their corresponding text boxes in a movie clip.. Can someone help?

View Replies !    View Related
Loading Variables Inside A Movie Clip
Hi!

I'd like to put a dynamic text inside a movie clip, how can I load the value of this text that is placed inside a .txt.

Note: I know how to asign a .txt to a dynamic text, but what I want to know is how to do it when it is inside a movie clip.

Please, help me!!!

View Replies !    View Related
Load Variables And Duplicate Movie Clip
Hi, I want to build a dynamic Portfolio. I want to read variables in from a text file and build a specified number of movie clips.

Let me explain. I want the text file to list the number of entries, then for each entry it will have ClientX=Client Name

So something like:

&pfentries=5

&text1=Client A
&text2=Client B
&text3=Client C
&text4=Client D
&text5=Client E

Now, I know how to load the text file. And I know how to repeat a Movie Clip 5 times. But I don't know how to duplicate the movie clip based on the number of entries represented by the variable pfentries.

Can anyone help me out?

View Replies !    View Related
Positioning A Movie Clip Using External Variables.
This post has moved here:
http://www.flashkit.com/board/showth...21#post2063021

View Replies !    View Related
Positioning A Movie Clip Using External Variables.
Hi,

I'm trying to position a movie clip inside a flash movie using variables stored in a text file.

I'm using a php file to write and then read from a text file. This all works fine and my flash movie is able to do both these things.

However when I try to use the variables to position the X and Y values of the movie clip, I'm unable to do so. the movie just wont pick up the variables that are in the movie (I can see the values of one_xpos and one_ypos in text fields in the movie so they ARE being read and ARE in the movie).


The first thing I've been doing is loading the variables 'one_xpos' and 'one_ypos' using a php file:

loadVariablesNum("http://www.website.com/folder/messageboards/php_text.php", 0);

I've then made sure the variables are numbers:
one_xpos = Number(one_xpos);
one_ypos = Number(one_ypos);

I've then tried to use these two variables to set the position of the movie clip:

setProperty("01", _x, one_xpos);
setProperty("01", _y, one_ypos);


this doesn't work for some reason.

When I don't load the variables but instead give one_xpos and give one_ypos values inside the movie it works and moves my movie clip!!

This is so frustrating please help.

Cheers
Ben.

View Replies !    View Related
Can Variables Be Used For Movie Clip Instance Names?
for instance:

var currentMovie = "movieClipA";
on (press) {
currentMovie._x += 30;
}

View Replies !    View Related
Access To Nested Movie Clip's Variables
I have a nested movie clip in my main movie. The nested clip has its own variables which are displayed in that clip's dynamic text box. My problem is that the nested clip works fine on it's own. It even works when it is nested and previewed in Flash. However, it does not work when nested and previewed in HTML. By "it does not work" I mean that ther values for the variables in the nested clip do not appear in the dynamic text box.

I've been wrestling with this for days now, and it's really put a wrench in my spokes. Any help at all would be greatly appreciated.

View Replies !    View Related
Applying Local Variables Into Movie Clip.
can someone help me? I'm creating an rpg, and i have a movie clip which serves as an interface. Now I want to input the local variables of the whole thing into the movie clip. how do I do that?

View Replies !    View Related
Passing Variables To A Duplicated Movie Clip?
Ok, let's say that I make a movie clip on the stage that has actionscript on frame 10 that moves the clip across the screen from left to right. Inside the clip is a little bit of actionscript that also tells the clip how fast to move depending on the variable 'speed'.

Now, in the main timeline I make 5 more copies of that clip with duplicateMovieClip. Let's say they are called move1, move2, move3, and so forth. To move which clips I want in actionscript on the main timeline, I just put in something like move3.gotoAndPlay (10);. To set the speed for ALL movie clips I just type in a global variable for speed like _global.speed = 5;

Ok, that all works fine and dandy, but what if I want to send a different speed to each movie clip. Making a global speed variable would change the speed for all of them, and since I am using duplicatedMovieClip to make the extra clips, they will all use the same variable (speed) to control how fast they move across the screen. Is there a way I can pass a different variable that speed might equal for each seperate instance?

View Replies !    View Related
Help With Using Variables To Determine Which Movie Clip Plays
id imagine this might be an easy problem, but im pretty new at flash and dont have much time, so any help would be good,

im importing external variables which change every hour and i have animations that i want to play depending on what data i get.

for example one variable is skyCondition (if its cloudy), and it can be either - clear, a bit of cloud, lots of cloud, very cloudy.

-and so i have animations that have varying levels of cloud, but the question is how do i code this so that the right animation plays and the other ones become hidden?

View Replies !    View Related
Setting Variables Inside A Movie Clip
i am having problems assigning values to variables that are situated inside a movie clip.
its something like this...

when i click a submit button in the main movie i want to assign a text box a value (text box called "score").
the text box is in a over state of a button in a different movie clip called "mc_rating".

i have the actionscript in the submit button and am address is the variable(score) this is what i have

set variable"/mc_rating:score" = value_entered_by_user

do i need to address the button as well, as the text button is in the button over state??

does it matter if the submit button is in frame fourty and the mc is in frame 10??

please help

View Replies !    View Related
Keeping Variables When Movie Clip Goes To New Scene Etc
Is there any way that I can store/keep the variables on an MC when I go onto a new scene etc

ie., a game, after you complete the level, It goes onto frame 2 on the main time line, this tells you your stats etc, then it goes back to frame 1 where enemies are stronger etc, how do I keep it from resetting the variables each time?

View Replies !    View Related
Dynamically Put Variables Inside A Movie Clip
In the past, I could dynamically add variables to a movie clip to assign values to them so that I was able to read them later per movie clip.

It doesn't seem like I can do this now. Is there anyway to do it?

Also, this is in a class, and when the student has answerd the quesiton, I need variables to be set from the main stage. (nextEnabled, backEnabled for buttons to become active). So on a side note, from a class, how do I set variables in the main stage?

thanks in advance

This is for a XML generated exam, and I'm creating the answers dynamically here:








Attach Code

for(var i:uint=0; i<ansTot; i++) {
var arNum:uint = Number(listArray[i]);
var disMC:MovieClip = new MovieClip();

var ansText:TextField = new TextField();
disMC.addChild(ansText).name = "ansText";
ansText.x = 15;
if(i == 0) {
thisY = stemText.height + 20;
ansText.y = thisY;
} else {
ansText.y = thisY;
}
ansText.width = 969;
ansText.autoSize = TextFieldAutoSize.LEFT;
ansText.styleSheet = quesCSS;
ansText.wordWrap = true;
ansText.multiline = true;
ansText.selectable = false;
ansText.condenseWhite = true;
ansText.antiAliasType = "advanced";
//ansText.border = true;
ansText.borderColor = 0xFFFFFF;
ansText.htmlText = "<span class='n'>" + formatScreenText(subXML[arNum]) + "</span>";

disMC.defaultText = formatScreenText(subXML[arNum]);
disMC.remediation = subXML[arNum].@remediation;
disMC.isCorrect = subXML[arNum].@correct;

disMC.addEventListener(MouseEvent.CLICK, answerClicked);

thisY += ansText.height + 10;

this.addChild(disMC);
}

private function answerClicked(event:Event):void {
var myAns = event.target;
if(this.isCorrect == "1") {
this.ansText.htmlText = "<span class='cor'>" + this.defaultText + "</span>";
} else {
this.ansText.htmlText = "<span class='wng'>" + this.defaultText + "</span>";
}
}

View Replies !    View Related
Input Variables To Control Movie Clip
Trying to build a piece where a truth table shows how a logic circuit's output responds to various combinations of inputs, using logic 1 for true and logic 0 for false. User enters a four digit output string and is able to view the gate type that will produce it. (16 possible permutations in this e.g.)
Here is what I have so far. Any help greatfully appreciated.

Nom de Guerre
//initialize variables
var input_str:String = "";

var Inner:String="";
Inner+text1.text;
Inner+text2.text;
Inner+text3.text;
Inner+text4.text;
//goto MC frame from input
function operate(){

_root.results.gotoAndStop._Inner;
}

// enter button
enter_btn.onRelease = function() {
//fill truth table out
input_strCharAt1=input_str.charAt(0);
input_strCharAt2=input_str.charAt(1);
input_strCharAt3=input_str.charAt(2);
input_strCharAt4=input_str.charAt(3);


}

View Replies !    View Related
Empty Movie Clip Loading Swf Which Contains Variables
Hi All,

I am going to approach this newbie problem from a different angle. It is on tracing variables. I have a attached main.fla, movieclip.fla, and movieclip.swf.

If you run main.fla from within flash you'll notice the actionscript on the first frame of main.fla is loading movieclip.swf into an empty movie clip called container on the first frame of main.fla. No problem.

In movieclip.swf I assigned three values to three different variables, a, b and c, on the first frame of moviclip.swf(See movieclip.fla) like this:
a = 1;
b="string";
c 1.234556;

Also, in the first frame of main.fla, there was actionscript as follows:

container.loadMovie("movieclip.swf");
trace (_root.container.a);
trace (_root.container.b);
trace (_root.container.c);

Now each of the above traces produced undefined results when I ran main.fla from within flash. And yes I had complied moviclip.swf. Why did I get undefined results? What concept am I not grasping?

A simple one for the masters.

From the newbie,
Libman

View Replies !    View Related
Passing Variables To A Duplicated Movie Clip?
Ok, let's say that I make a movie clip on the stage that has actionscript on frame 10 that moves the clip across the screen from left to right. Inside the clip is a little bit of actionscript that also tells the clip how fast to move depending on the variable 'speed'.

Now, in the main timeline I make 5 more copies of that clip with duplicateMovieClip. Let's say they are called move1, move2, move3, and so forth. To move which clips I want in actionscript on the main timeline, I just put in something like move3.gotoAndPlay (10);. To set the speed for ALL movie clips I just type in a global variable for speed like _global.speed = 5;

Ok, that all works fine and dandy, but what if I want to send a different speed to each movie clip. Making a global speed variable would change the speed for all of them, and since I am using duplicatedMovieClip to make the extra clips, they will all use the same variable (speed) to control how fast they move across the screen. Is there a way I can pass a different variable that speed might equal for each seperate instance?

View Replies !    View Related
Finding Variables In Movie Clip Array
So I have a number of movie clips on the stage, each of which declares the variable "tagNum" on load. Each movie clip has a different value for "tagNum".
Example:

Code:
onClipEvent (load) {
this.tagNum = 3;
}
Here's what I want to do. As part of my script, I want to cycle through all the clips, and determine the value of "tagNum" for each clip. Thing is, I can't figure out how do this this.

When I tried this...
Code:
for (var i in this) {
if (typeof (this[i]) == "movieclip") {
trace(this[i].tagNum);
}
}
I keep getting "undefined" returned.

Could someone please tell me what I'm doing wrong and how I can fix it?

View Replies !    View Related
How Can I Load Variables (text) Directly Into Movie Clip
Hello, I have a problem loading text variable directly into MC (text) into textfield (bar)
the script I used on Main timeline is :
loadVariables ("crimea.txt", _level0.text.bar);

have any ideas what's wrong with it,
-thanks-

View Replies !    View Related
Refering To Movie Clip Properties/variables Dynamically
I have started to write this game, but the same syntax problems keep coming up whenever I try to refer to movie clip properties/variables dynamically.

For example:

// ( I realise eval is out of date, anyone got any
// better ideas?)

enemy = _root.game.row1.enemy1; // set enemy path

distance = [eval(enemy + ".position")] -_root.game.player.square;
// access the property position using eval and subtract a variable from it.

The result upon execution yields NaN.

So distance is trying to do math on a MC. Why? I thought eval and the array access operator was used for such routines.



Can anyone help? . . . I can't continue my game 'till this ones sorted!



Thanks.

View Replies !    View Related
Movie Clip Variables Not Passed With GetUrl Action.......
Hey all.

I've got a simple Flash form with which I'd like to pass the form field
values in a Url String to my test output page. Here's the problem:

The hidden variables and the external text file variables that I set in
frame 1 of the main timeline get passed along fine with the GetUrl action.
However, the variables set in the 5 movie clips (the main timeline, by the
way, only has one frame with a stop action) are not getting passed with the
GetUrl action.

Now, how do I pass the variables set in the movie clips? It seems that since
there's a stop action in frame 1 of the main timeline, the user's clicking
the submit button (i.e. triggering the GetUrl action) is only passing the
variables I set in frame 1 of the main timeline.........

Any ideas? I can't find Jack in MM's tech notes, or the Action Script
reference guide. Thanks for any clues,

--Noah

View Replies !    View Related
Passing Variables From The Main Timeline To A Movie Clip.
Hi. I have (successfully) taken variables from a txt file and had them display in some dynamic text boxes on the main timeline of my movie, BUT, I would like them to show in a movie clip (within that movie) instead of showing on the main timeline/movie. The movie is here (the variables aren't shown there) and what I wanna have done is have the variables load up in the main timeline, but when the user presses the launch shoutbox button, I want the variables to be shown in there, get me? So how would I go about passing the variables from the timeline to that movie clip?
Thanks in advance, Chris.

View Replies !    View Related
Please This Is An Easy Issue Trying To Use Variables To Control A Movie Clip
also using Version5. I'm trying to have my navigation animate from a menu that jiggles alittle bit in the middle of the screen but then when a button is pressed the navigation animates to the top of the screen and then the content clip plays the content that was triggered by the button. then when a button is press from the navigation that is now already animated and on the top of the page to just play that buttons content. So the content clip has two frame labels one at frame 1 then the next frame label at frame 27. its like www.davidsirieix.com but when a button is pressed the nav buttons move to the top of the page.

on the _root i have two frames both is a with a stop action and a set varable. nav=set and on the next frame nav=still between the two the frames the buttons move to different locations(the top of the page). the reason i want variable is so that the movieclip with my main content will know where the navigation is and will act according to that.

So what i've done is the navigation(the buttons) are animated on the main timeline but each button is nested inside of its own movie clip that makes the button move alittle. What sucks is that i'm having to put the Script for the button on each frame of the animation because is has already been animated. Anyway on each keyframe inside of the button clip(3 of them)i'm selecting the button and putting an action on it: pseudo
on (press)
if(_root.nav=set)
_root.content.gotoAndPlay("content made for set"):
else if(_root.nav=still)
_root.contect.gotoAndStop("content made for still")

what happens is my button doesn't do anything. Its been awhile since i got into flash but i'm pretty sure this type of stuff shouldn't be a problem. If you can help or contact me ctnyc@hotmail.com i would be really appriative of it. thanks and good luck

View Replies !    View Related
Passing Variables Into A Movie Clip On Another Frame With JavaScript? <<<HELP
Hello,

Can anyone tell me how to pass a varaible into a flash movie with javascript. I have the code to take the movie clip to a frame label, but in this case that code does not help.

thanks

-----------TAKE A MOVIE CLIP TO A FRAME WITH JAVA Script___

<SCRIPT LANGUAGE=JavaScript>
function blank() {
javavar = "blank"
document.nav.TGotoLabel("/",javavar);
}

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved