Hi all hope someone can help out with this one. I have two questions
Ok so options is the array there can be many or one outside swf. we go through the array creating empty movieClip and populating each with an outside swf. Once loaded i want to use these newly created movieClips as buttons.
- can i declare the onPress in a for loop?
- how do i centre and space them no matter how many they are the will be linear.
for (var i:Number = 1 ; i<options.length; i++){
//create a holder
_root.createEmptyMovieClip("optionD"+i,4+i);
//populate it
this["optionD"+i].loadMovie("../swf/option"+i+".swf");
//give it _x and _y ugly way of doing it
this["optionD"+i]._x= panout;
this["optionD"+i]._y= 375;
panout = panout+80;
_root["optionD"+i].onPress,onRollOver = function(){
trace(_root["optionD"+i]);
_root["optionD"+i].gotoAndStop(2);
//call the rest of it
};
_root["optionD"+i].onRollOut = function(){
trace(_root["optionD"+i]);
_root["optionD"+i].gotoAndStop(1);
};
}