Hello everyone, “AS” newbie here. I have an issue with some AS. At this address:
http://midwestwebdesign.net/temp/index.htm
As you roll over your mouse progressively faster over the building(s), the individual highlights for the buildings (movie clips inside the main movie) seem to jam up. I have frame rate at 30 which I don’t want to go any faster unless I need to. I think its an issue of my Action Script. The below address:
http://midwestwebdesign.net/temp/test.htm
Shows my new Action Script, which is verison 7. Basically I’ve created a function that will allow my building to utilize the _visible property, true is they are shown, false if not. But I can’t for the life of me figure out how to call the individual highlight movie clips inside my main timeline to actually show the highlight. The AS for the function I believe is fine, just missing one part.
The function looks like this in the main timeline:
var clipNames=["graff","lincoln","ic","ice","icw","tec","cec","bic","ittc","childcare","bookstore"];//etc...
function setHighlight(clip:String){
// here we pass in a string for the name of the clip we want to highlight
// ie: "graff"
"graff"
"lincoln"
"ic"
"icw"
"ice"
"tec"
"cec"
"bic"
"ittc"
"childcare"
"bookstore"
// next, loop through the array
for(var i=0;i<clipNameslength;i++){
// if the string passed in matches the current array item, highlight it
if(clipNames*==clip){
this[clipNames*+"Hovermc"]._visible="true";
}
// if not, turn it off
else{
this[clipNames*+"Hovermc"]._visible="false";
}
}
}
// this will turn off all clips to start
setHighlight(null);
this.graffBtn.onRollOver=function(){
_parent.setHighlight("graff");
}
The way I target the movie clip building is like so:
_parent.setHighlight("graff");
The individual movie clips are two frame sequences, with the first being stop and the second frame showing the code above. I would appreciate any feedback or suggestions.