Graph Opinion

Well I am getting warmer anyway. If I could figure out what I did to mess up the loading of the question text I would feel better. But I will give myself a chance first since I have not had time to look at it today…(before I get too frustrated) I have not used the debugger I usually forget about that as an option so maybe now I will remember it is available.

I noticed you had the line
myclip = _root.attachMovie(“mystatequestion”, “question”, i+10);
twice,when you only need once so maybe change that.
If not check that you are not putting things at the same depth.

Well I will certainly do that. Thank you!

http://www.gifsrus.com/testfile/loadtest.zip

Hey, you’re get ahead of me, (which ah yes is very easy to do) here I was deleting the duplication of that line of code, (which of course was the problem) and I come back and you already have a new file posted that does more…lol

thanks!

Imagine how quickly this entire thing could have been done if I actually knew what I was doing

stringy-
I am trying to work the loading code into the main movie, rather than just the test file that you sent. I have tried a couple things…first off just adding it in as code at the end of everything…of course that was not right.
Well then I tried what seemed to make sense which was working it with everything that is already set up to find mystate numbers (the ivar that is already being used when the question is pulled) and I added it in as it’s own function…I tried another onPress function, and since there already is an onPress, I tried an onRelease. Still nothing. Well I have come to the conclusion that I think that the load.swf…should be part of the onPress function that is already set up. But that is not seeming to work either who knows how close I could even be to having it set up correctly though.

Now, when I say that nothing is happening, the emptymc is being created just fine. OMG I just realized something… while typing this. The empty mc is being created in level -100 I think. Since I have other things on higher levels in this movie maybe that is the problem. Let me go check and I will be back.

Crap I was looking at the wrong file. It is actually going into level 1000.
Here is the current code:

//setting color property for color buttons
color0.col = 0xFF0000;
color1.col = 0x4646D1;
color2.col = 0xFFFF66;
color3.col = 0x009900;
color4.col = 0xFF9900;
wronganswercolour = 0x999999;
//defining arrays referred to later on
questions = [];
answers = [];
myArray = [];
myOpponentsArray = [];
pressedArray = [];
correctanswer = [];
//creating empty mc for image.swf’s to load into
createEmptyMovieClip(“paper”,1000)
paper._alpha = 0
//gathering name information setting color
finalName = “Please enter your name”;
for (var c = 0; c<5; c++) {
this[“color”+c]._visible = false;
}
reset._visible = false;
submit.onRelease = function() {
finalName = “Hello “+inputName+”, Please choose your campaign color”;
input._visible = false;
reset._visible = true;
submit._visible = false;
for (var c = 0; c<5; c++) {
this._parent[“color”+c]._visible = true;
}
};
//in the following, i have just looped through to give values to questions answers etc
//when you come to make it properly, you can take there out of the loop and just type
//them in as we did before
//states 0 through 18 should not be affected by this
//because it is only set for 19 through 47
for (var i = 19; i<48; i++) {
trace(this[“mystate”+i])
questions.push(“This is question”+i);
correctanswer.push("answerA "+i);
myA = ["answerA "+i, "answerB "+i, "answerC "+i, “answerD “+i];
answers.push(myA);
this[“mystate”+i].ivar = i-19;
this[“mystate”+i].onRollover = function() {
this._alpha = 30;
};
this[“mystate”+i].onRollout = function() {
this._alpha = 100;
};
this[“mystate”+i].onPress = function() {
trace(this)
this._alpha = 100;
this.onRollOver = undefined;
this.onPress = undefined;
pressedArray.push(this);
trace(pressedArray)
//the following lines are for the benefit of your components
//may be a better way
_root.k = this.ivar;
comp0var = answers[this.ivar][0];
comp1var = answers[this.ivar][1];
comp2var = answers[this.ivar][2];
comp3var = answers[this.ivar][3];
trace(comp3var);
myclip = _root.attachMovie(“mystatequestion”, “question”, i+10);
myclip.myText.text = questions[this.ivar];
_root.question._x = 600;
_root.question._y = 400;
instructions._visible = false;
clearInterval(fadeInterval)
clearInterval(seeinterval)
fadeInterval = setInterval(fadeaway,50,this.ivar)
}
function fadeaway(fg){
trace(paper._alpha)
paper._alpha-=2
if(paper._alpha<=0){
paper._alpha = 0
clearInterval(fadeInterval)
loadMovie(“image”+fg+”.swf”,paper)
loadinterval =setInterval(loading,20)
}
}
function loading(){
if(paper.getBytesLoaded>=paper.getBytesTotal() && paper.getBytesLoaded()>0){
clearInterval(loadinterval)
paper._alpha = 0
seeinterval = setInterval(fadein,50)
}
}
function fadein(){
trace(paper._alpha)
paper._alpha +=2
if(paper._alpha>=100){
paper._alpha = 100
clearInterval(seeinterval)
}
}
for (var n = 19; n<48; n++) {
this._parent[“mystate”+n].enabled = false;
}
};
//questions = [“is this the first state chosen?”, “2.what shape is this?”, “3.what direction is this?”, “4.who lives here?”, “5.who lives here?”, “6.who lives here?”, “7.who lives here?”, “8.who lives here?”, “9.who lives here?”];
//answers = [[“this is the first state”, “this is not the first state”, “this is not the first state”, “this is not the first state”], [“square”, “oval”, “triangular”, “who cares”], [“North”, “South”, “East”, “West”], [“The president”, “The presidents fancy piece”, “nobody”, “don`t know”]];
//correctanswer = [“this is the first state”, “square”, “East”, “nobody”, “nobody”, “nobody”, “nobody”, “nobody”, “nobody”, “nobody”];
stop();
for (var s = 0; s<19; s++) {
myArray.push(this[“mystate”+s]);
}
for (var g = 0; g<myArray.length; g++) {
myArray[g][“myColour”+g] = new Color(myArray[g]);
myArray[g].col = myArray[g][“myColour”+g].getTransform();
}
for (var j = 0; j<5; j++) {
this[“color”+j].onPress = function() {
for (var i = 0; i<myArray.length; i++) {
myColour = new Color(myArray*);
myColour.setRGB(this.col);
_root.maincolor = this.col;
reset._visible = false;
finalName = “Please choose one of your opponents states”;
color0._visible = false;
color1._visible = false;
color2._visible = false;
color3._visible = false;
color4._visible = false;
}
};
for (var l = 0; l<myArray.length; l++) {
myArray[l].onPress = function() {
myArray[l].enabled = false;
};
}
}
reset.onPress = function() {
input._visible = true;
inputName = ""
finalName = “Please enter your name”;
reset._visible = false;
submit._visible = true;
for (k=0; k<myArray.length; k++) {
myArray[k][“myColour”+k].setTransform(myArray[k].col);
}
};
//setting color of opponents states
for (var t = 19; t<48; t++) {
myOpponentsArray.push(this[“mystate”+t]);
}
for (var u = 0; u<myOpponentsArray.length; u++) {
myOpponentsArray[u].myColor = new Color(myOpponentsArray[u]);
myOpponentsArray[u].myColor.setRGB(0x999999);
};
_root.total = 0
_root.totalquestions = 0

see if this gets you any nearer.
//setting color property for color buttons
color0.col = 0xFF0000;
color1.col = 0x4646D1;
color2.col = 0xFFFF66;
color3.col = 0x009900;
color4.col = 0xFF9900;
createEmptyMovieClip(“paper”, 1000);
paper._alpha = 0;
movieClip.prototype.doSomething = function() {
//otherstuff
//would normally disable buttons here but i think your code already does that
clearInterval(fadeInterval);
clearInterval(seeinterval);
fadeInterval = setInterval(fadeaway, 50, this.ivar);
};
function fadeaway(fg) {
trace(paper._alpha);
paper._alpha -= 2;
if (paper._alpha<=0) {
paper._alpha = 0;
clearInterval(fadeInterval);
loadMovie(“fancygraphic”+(fg)+".swf", paper);
loadinterval = setInterval(loading, 20);
}
}
function loading() {
if (paper.getBytesLoaded>=paper.getBytesTotal() && paper.getBytesLoaded()>0) {
clearInterval(loadinterval);
paper._alpha = 0;
seeinterval = setInterval(fadein, 50);
}
}
function fadein() {
trace(paper._alpha);
paper._alpha += 2;
if (paper._alpha>=100) {
paper._alpha = 100;
clearInterval(seeinterval);
}
}
createEmptyMovieClip(“clip1”, -100);
clip1._x = 168.500000;
clip1._y = 176;
loadMovie(“image29.swf”, clip1);
wronganswercolour = 0x999999;
//defining arrays referred to later on
questions = [];
answers = [];
myArray = [];
myOpponentsArray = [];
pressedArray = [];
correctanswer = [];
images = [];
//load artwork swf’s
//yes you have got the right idea.its actually possible to load them all
//sequentially but then if a user chooses a question while loading then
//the order change and that “fancy graphic” will load first.Probably
//better just to see how you get on. You only need the one function to make
//invisible,maybe put all the swfs into an array and loop through that.
//testing createEmptyMC for onPress
for (var v = 19; v<48; v++) {
createEmptyMovieClip(“clip”+v, v+500);
this[“mystate”+v].ivar = v;
this[“mystate”+v].Klip = this[“mystate”+v]._parent[“clip”+v];
}
//gathering name information setting color
finalName = “Please enter your name”;
for (var c = 0; c<5; c++) {
this[“color”+c]._visible = false;
}
reset._visible = false;
submit.onRelease = function() {
finalName = “Hello “+inputName+”, Please choose your campaign color”;
input._visible = false;
reset._visible = true;
submit._visible = false;
for (var c = 0; c<5; c++) {
this._parent[“color”+c]._visible = true;
}
};
//in the following, i have just looped through to give values to questions answers etc
//when you come to make it properly, you can take there out of the loop and just type
//them in as we did before
//states 0 through 18 should not be affected by this
//because it is only set for 19 through 47
for (var i = 19; i<48; i++) {
trace(this[“mystate”+i]);
questions.push(“This is question”+i);
correctanswer.push("answerA "+i);
myA = ["answerA "+i, "answerB "+i, "answerC "+i, "answerD "+i];
answers.push(myA);
images.push(image.swf+i);
this[“mystate”+i].ivar = i-19;
this[“mystate”+i].onRollover = function() {
this._alpha = 30;
};
this[“mystate”+i].onRollout = function() {
this._alpha = 100;
};
this[“mystate”+i].onPress = function() {
this.dosomething();
trace(this);
this._alpha = 100;
this.onRollOver = undefined;
this.onPress = undefined;
pressedArray.push(this);
trace(pressedArray);
_root.clip1._visible = true;
//the following lines are for the benefit of your components
//may be a better way
_root.k = this.ivar;
comp0var = answers[this.ivar][0];
comp1var = answers[this.ivar][1];
comp2var = answers[this.ivar][2];
comp3var = answers[this.ivar][3];
trace(comp3var);
trace(this.klip);
myclip = _root.attachMovie(“mystatequestion”, “question”, i+10);
myclip.myText.text = questions[this.ivar];
_root.question._x = 600;
_root.question._y = 400;
instructions._visible = false;
for (var n = 19; n<48; n++) {
this._parent[“mystate”+n].enabled = false;
}
};
}
//questions = [“is this the first state chosen?”, “2.what shape is this?”, “3.what direction is this?”, “4.who lives here?”, “5.who lives here?”, “6.who lives here?”, “7.who lives here?”, “8.who lives here?”, “9.who lives here?”];
//answers = [[“this is the first state”, “this is not the first state”, “this is not the first state”, “this is not the first state”], [“square”, “oval”, “triangular”, “who cares”], [“North”, “South”, “East”, “West”], [“The president”, “The presidents fancy piece”, “nobody”, “don`t know”]];
//correctanswer = [“this is the first state”, “square”, “East”, “nobody”, “nobody”, “nobody”, “nobody”, “nobody”, “nobody”, “nobody”];
stop();
for (var s = 0; s<19; s++) {
myArray.push(this[“mystate”+s]);
}
for (var g = 0; g<myArray.length; g++) {
myArray[g][“myColour”+g] = new Color(myArray[g]);
myArray[g].col = myArray[g][“myColour”+g].getTransform();
}
for (var j = 0; j<5; j++) {
this[“color”+j].onPress = function() {
for (var i = 0; i<myArray.length; i++) {
myColour = new Color(myArray*);
myColour.setRGB(this.col);
_root.maincolor = this.col;
reset._visible = false;
finalName = “Please choose one of your opponents states”;
color0._visible = false;
color1._visible = false;
color2._visible = false;
color3._visible = false;
color4._visible = false;
}
};
for (var l = 0; l<myArray.length; l++) {
myArray[l].onPress = function() {
myArray[l].enabled = false;
};
}
}
reset.onPress = function() {
input._visible = true;
inputName = “”;
finalName = “Please enter your name”;
reset._visible = false;
submit._visible = true;
for (k=0; k<myArray.length; k++) {
myArray[k][“myColour”+k].setTransform(myArray[k].col);
}
};
//setting color of opponents states
for (var t = 19; t<48; t++) {
myOpponentsArray.push(this[“mystate”+t]);
}
for (var u = 0; u<myOpponentsArray.length; u++) {
myOpponentsArray[u].myColor = new Color(myOpponentsArray[u]);
myOpponentsArray[u].myColor.setRGB(0x999999);
}
_root.total = 0;
_root.totalquestions = 0;

Well it’s working :thumb:
Removed a couple extras that were left over from testing and had to put a +19 in this block in order for it load the correct swf…
not quite sure why but I knew it had to be something like that because before when you showed me that the ivar for the questions had to be equal to i-19 rather than the value of i…
anyway it’s working!
After a meeting yesterday I was informed that not only does this have to work, (loading an image swf when a state is chosen) but another will have to load dependant upon the answer that is chosen…right answer or wrong answer. It’s always something eh?
Thank you for your superior guidance!

paper._alpha = 0;
movieClip.prototype.doSomething = function() {
//otherstuff
//would normally disable buttons here but i think your code already does that
clearInterval(fadeInterval);
clearInterval(seeinterval);
fadeInterval = setInterval(fadeaway, 50, this.ivar[COLOR=DarkRed]+19[/COLOR]);
};

Blimey, I hate it when your meetings come along.
see if this helps
http://www.gifsrus.com/testfile/fancyG1.zip
only works for the states which i have made swf`s for.(contain a little square-my US geography is not so good)

Yes, I hate it too. I try to hide my frustration as there is not much I can do about it, but I am not much of one for a poker face. Oh well. Thank you for the great example! Works well, so I am going to try get it going with my current file and fancy graphics.

Good news. I talked with my boss and “we” decided that we don’t need to load completely new swf’s based upon a right or wrong answer. I hope it stays that way. I feel bad that you already created such a nice example, but good that this may be done in time =)

well at least it`s already made for when he changes his mind back again at the next meeting.

Yes =)

Could you please give your opinion(s) on this. If you look at this file, you can see that when you choose a state, a movieClip (the gray shield) is loaded at the top of the interface.

Well, here are my problems. #1, you can see that it slows everything down because that comes in the same time the question comes in. I am going to try and see if it makes a difference if I do any alpha effects, etc in the actual swf being load rather than through the main movie (such as it is now) to see if that helps, but I don’t know that it will. I know that anytime you use a lot of alpha effects, etc it tends to slow a movie down.

#2 This movieClip, the gray shield is going to be a representation of what number question is up at that time. So rather than just being a simple clip that is loaded when a state is chosen, it is going to have to keep track of how many questions have already been chosen in order to display the correct number.

I know this can be done because of what you have already shown me with the questions loading and now the fancygraphic swf’s loading. I am just wondering what is going to be the best way to do this. Such as:

  • Starting out with everything loaded (a gray shield movieClip with a number 1 through 10) but have it all set to alpha zero. When the question is chosen, the alpha will fade in to 100 and then lighten back up to 50 percent or less once an answer is chosen.

-Start out with the numbers only as described above on a level above where the current gray shield movieClip is loaded each time a question is selected. Number will fade in as grayShield movieClip is loaded. They will both fade once an answer has been selected. I am thinking this is probably not the best solution since it will probably slow the movie down even more. This would have a function to set alpha to 100 on the number, and attach the gray shield movieClip with a new x value each time…such as _root.movieclipname._x= i + 10 or whatever it would be.

I think I am just going to proceed by first testing the loading of the fancygraphic swf as I mentioned above. Once I see if that helps out any, I will try out how the question number will be displayed.

Also, I know right now we have the total question and right answer that are displayed (top right above the map) but that will actually be removed at some point. That would be too easy to show it that way…and this is supposed to be as entertaining as possible in the length of time there is to complete. Since you know how I struggle with all this, you can imagine how entertaining it will be but it will a million times better than if I ever tried doing it on my own (without you, not without them) Okay I am going on and you probably aren’t even following anymore, so if you have some fresh outlook on this I would love to hear it.

Yeh it looks far too slow as you say. Have you tried without the text thing at the bottom? You could also try reducing the interval/increasing the _alpha step. Another thing we could try is to alter the code so that the question does not show until the movie loads but would still be slow i guess.
I know your boss doesnt like preloaders but you could do something while the movie is loading; doesnt have to be loading bar/% thing; you could have your text rotate etc while the movie loads(or something equally subtle!!)
If you fail to get the _alpha transition up to scratch, you could try another type of transition maybe using masking or scale.
Not sure i understand your second question.Couldn`t you just put a textfield in the grey shield thing and keep track as you have done at the top right.
If you want to fade dynamic text, you have to embed the font.

Well I know the text thing at the bottom is part of the culprit, but unfortunately, I don’t have the choice of removing that. I don’t know that making it on my own rather than using a component (which is what it is, a ticker component) would be any less cumbersome and I already spent quite some time trying to figure it out anyway.

What I would like to be able to do is just load the swf with no fading set in the main movie, but I can seem to work my way around that one. Maybe a different effect wouldn’t bog it down so much but I have not been able to understand it enough to remove that from the code and simply have a load action(and have not tried changing to a new effect), although I did play around a bit with the interval numbers to try and set what would effect how quickly the alpha fadein was taking place. I believe this was set to five when you sent it to me, and I was able to take it down to one after realizing the higher the number, the slower it would go. Negative numbers did not seem to change things.

I think there may be no other solution other than to use some type of preloader though…once I show the jerkiness of the file I would think that that would have to be agreed upon.

For the second question, I know my explanation is a bit blurry. I would like to be able to do the dynamic text as you suggested the problem with that is there will be 10 different images, unless I can get that approved to be changed as well.

For now, I am taking a “break” and working on something that I think I can handle, then I will go back and take a fresh look.

As alway, I truly appreciate your feedback!

The ticker thing is fairly easy to make but not sure it would be any more efficient.
If you want me to remove the _alpha tween, i will, or if you decide on another sort of transition (if you find an example on another site or something ) we should be able to work that out.
if there are 10 different images, you could either have one textfield at a higher depth or have a textfield in each image(mc) instance with the same instance name.

Well do you think that taking the alpha effect out of the main movie would help any? Here is the latest file I am have been working with today. Not much progress on my part.
Please look only if you have time I completely understand if you don’t. But without beating around the bush yes I would love it if you could remove the alpha tween.

I played around with a couple of different _alpha fadein type things but still a little jumpy.
Out it is
fscommand(fullscreen, true);
//setting color property for color buttons
color0.col = 0xFF0000;
color1.col = 0x4646D1;
color2.col = 0xFFFF66;
color3.col = 0x009900;
color4.col = 0xFF9900;
createEmptyMovieClip(“paper”, 20);
paper._x = 168.500000;
paper._y = 176;

function loading() {
if (paper.getBytesLoaded()>=paper.getBytesTotal() && paper.getBytesLoaded()>0) {
clearInterval(loadinterval);
trace(“loaded”)
}
}
wronganswercolour = 0x999999;
//defining arrays referred to later on
questions = ;
answers = ;
myArray = ;
myOpponentsArray = ;
pressedArray = ;
correctanswer = ;
//gathering name information setting color
finalName = “Please enter your name”;
for (var c = 0; c<5; c++) {
this[“color”+c]._visible = false;
}
reset._visible = false;
submit.onRelease = function() {
finalName = “Hello “+inputName+”, Please choose your campaign color”;
input._visible = false;
reset._visible = true;
submit._visible = false;
for (var c = 0; c<5; c++) {
this._parent[“color”+c]._visible = true;
}
};
//in the following, i have just looped through to give values to questions answers etc
//when you come to make it properly, you can take there out of the loop and just type
//them in as we did before
//states 0 through 18 should not be affected by this
//because it is only set for 19 through 47
for (var i = 19; i<48; i++) {
questions.push(“This is question”+i);
correctanswer.push("answerA "+i);
myA = ["answerA "+i, "answerB "+i, "answerC "+i, “answerD “+i];
answers.push(myA);
this[“mystate”+i].ivar = i-19;
this[“mystate”+i].onRollover = function() {
this._alpha = 30;
};
this[“mystate”+i].onRollout = function() {
this._alpha = 100;
};
this[“mystate”+i].onPress = function() {
paper.loadMovie(“image”+Number(this.ivar+19)+”.swf”);
loadinterval = setInterval(loading, 20);
trace(this);
this._alpha = 100;
this.onRollOver = undefined;
this.onPress = undefined;
pressedArray.push(this);
trace(pressedArray);
//the following lines are for the benefit of your components
//may be a better way
_root.k = this.ivar;
comp0var = answers[this.ivar][0];
comp1var = answers[this.ivar][1];
comp2var = answers[this.ivar][2];
comp3var = answers[this.ivar][3];
trace(comp3var);
myclip = _root.attachMovie(“mystatequestion”, “question”, i+10);
myclip.myText.text = questions[this.ivar];
_root.question._x = 600;
_root.question._y = 400;
_root.attachMovie(“questionshield”, “questionshield1”, 200);
_root.questionshield1._x = 200;
_root.questionshield1._y = 75;
instructions._visible = false;
for (var n = 19; n<48; n++) {
this._parent[“mystate”+n].enabled = false;
}
};
}
//questions = [“is this the first state chosen?”, “2.what shape is this?”, “3.what direction is this?”, “4.who lives here?”, “5.who lives here?”, “6.who lives here?”, “7.who lives here?”, “8.who lives here?”, “9.who lives here?”];
//answers = [[“this is the first state”, “this is not the first state”, “this is not the first state”, “this is not the first state”], [“square”, “oval”, “triangular”, “who cares”], [“North”, “South”, “East”, “West”], [“The president”, “The presidents fancy piece”, “nobody”, “don`t know”]];
//correctanswer = [“this is the first state”, “square”, “East”, “nobody”, “nobody”, “nobody”, “nobody”, “nobody”, “nobody”, “nobody”];
stop();
for (var s = 0; s<19; s++) {
myArray.push(this[“mystate”+s]);
}
for (var g = 0; g<myArray.length; g++) {
myArray[g][“myColour”+g] = new Color(myArray[g]);
myArray[g].col = myArray[g][“myColour”+g].getTransform();
}
for (var j = 0; j<5; j++) {
this[“color”+j].onPress = function() {
for (var i = 0; i<myArray.length; i++) {
myColour = new Color(myArray*);
myColour.setRGB(this.col);
_root.maincolor = this.col;
reset._visible = false;
finalName = “Please choose one of your opponents states”;
color0._visible = false;
color1._visible = false;
color2._visible = false;
color3._visible = false;
color4._visible = false;
}
};
for (var l = 0; l<myArray.length; l++) {
myArray[l].onPress = function() {
myArray[l].enabled = false;
};
}
}
reset.onPress = function() {
input._visible = true;
inputName = “”;
finalName = “Please enter your name”;
reset._visible = false;
submit._visible = true;
for (k=0; k<myArray.length; k++) {
myArray[k][“myColour”+k].setTransform(myArray[k].col);
}
};
//setting color of opponents states
for (var t = 19; t<48; t++) {
myOpponentsArray.push(this[“mystate”+t]);
}
for (var u = 0; u<myOpponentsArray.length; u++) {
myOpponentsArray[u].myColor = new Color(myOpponentsArray[u]);
myOpponentsArray[u].myColor.setRGB(0x999999);
}
_root.total = 0;
_root.totalquestions = 0;
//this will hide the mouse when over states that cannot be choosen
//(only preset user states) and display the windows arrow
for (var z = 0; z<myArray.length; z++) {
myArray[z][“mystate”+z].onMouseMove = function() {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
Mouse.hide();
Arrow._visible = true;
Arrow._x = _root._xmouse;
Arrow._y = _root._ymouse;
} else {
Mouse.show();
Arrow._visible = false;
}
};
updateAfterEvent();
}
myStage.onMouseover = function() {
Arrow.gotoandStop(1);
};

thank you!!
I am about to go and try it out, although I have something I have been looking at for a while and cannot figure out. I have this to hide the hand pointer when the mouse is over one of the user states and display an arrow pointer instead. It is only working for mystate18. It is supposed to be working for mystate0 through mystate18. I am sure that I have to be telling it somewhere only work for mystate18, but I have not yet figured it out.

for (var y = 0; y<19; y++) {
myArray.push(this[“mystate”+y]);
}
for (var z = 0; z<myArray.length; z++) {
myArray[z].onMouseMove = function() {
if (this.hitTest(_root._xmouse,_root._ymouse, true)) {
Mouse.hide();
myArrow._visible = true;
myArrow._x = _root._xmouse;
myArrow._y = _root._ymouse;
}else{
Mouse.show();
myArrow._visible = false;
}
}
updateAfterEvent();