So I’m making a flash ad for the internet related to relationship counsellings. The main area gives the user the ability to chose from a series of questions in a combo box or ask their own question (in which case a text box appears for typing). Anyways–i have a button at the bottom of the box which simply takes the user to the following page after he/she chooses a question. However, after the user chooses a question and I click on the button it does not access the the url but if i click a second time it will function properly. In testing I noticed that if the user does not access the combo box at all then the button works fine, so there must be something with the combo box that is interfering with the proper functionality of the button. I’m doing this for a job in which I am a graphic designer and therefore hold actionscript on a similar level as having my hairs plucked from my scalp one by one. I got the combo box code from the internet and it is worked into the code that i had already made. This also came with an actionscript file that was 1200 lines long so i can supply that as well–if anyone can help you’d not only be helping a fellow human out but you’d be saving a life in the process!
stop();
this.next_btn.onRollOver = function(){
next_btn.gotoAndPlay(2);
}
this.next_btn.onRollOut = function(){
next_mc.gotoAndPlay(1);
}
this.next_btn.onRelease = function(){
trace("click");
getURL("enterphone.html", _self);
}
this.main_mc.marriage_mc.onRollOver = function(){
main_mc.marriage_mc.gotoAndStop(2);
}
this.main_mc.marriage_mc.onRollOut = function(){
main_mc.marriage_mc.gotoAndStop(1);
}
this.main_mc.breakUp_mc.onRollOver = function(){
main_mc.breakUp_mc.gotoAndStop(2);
}
this.main_mc.breakUp_mc.onRollOut = function(){
main_mc.breakUp_mc.gotoAndStop(1);
}
this.main_mc.relationship_mc.onRollOver = function(){
main_mc.relationship_mc.gotoAndStop(2);
}
this.main_mc.relationship_mc.onRollOut = function(){
main_mc.relationship_mc.gotoAndStop(1);
}
this.main_mc.passion_mc.onRollOver = function(){
main_mc.passion_mc.gotoAndStop(2);
}
this.main_mc.passion_mc.onRollOut = function(){
main_mc.passion_mc.gotoAndStop(1);
}
//comboBox
import ComboBox.as;
var ab:ComboBox = new ComboBox ();
ab.scope = this;
ab.rowCount = 6;
ab._x =150;
ab._y = 100;
//ab.openEasing = com.robertpenner.easing.Expo.easeOut;
//ab.closeEasing = com.robertpenner.easing.Expo.easeOut;
ab.openDuration = 15;
//ab.setStyle ("bold", true);
ab.setStyle ("font", "Century Gothic");
//ab.setStyle ("blockIndent", 10);
//ab.setStyle ("color", 0xFF9900);
//ab.setStyle ("wordWrap", true);
ab.setStyle ("size", 13);
//setStyle ("multiline", true);
//setStyle ("type", "input");
ab.setStyle ("text", "Please choose a question");
stateArray = new Array ("United States", "------------", "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "Washington D.C.", "West Virginia", "Wisconsin", "Wyoming", " ", "Canada", "------------", "Alberta", "British Columbia", "Manitoba", "New Brunswick", "Newfoundland", "Labrador", "N.W. Territories", "Nova Scotia", "Nunavut", "Ontario", "Prince Edward Is.", "Quebec", "Saskatchewan", "Yukon");
//smallArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
//ab.dataProvider=smallArray;
function add ()
{
for (var i = 0; i < stateArray.length; i++)
{
ab.addItem (stateArray* + "\r" + stateArray*);
}
}
//ab.theme = "0x79896D";
var object = new Object ();
object.change = function ()
{
var select:String = ab.selection.data;
trace(select);
if(select == questions_arr[4]){
input_mc.gotoAndStop(20);
}
}
ab.addEventListener ("change", object);
questions_arr = ["How do I know if he is cheating on me?", "What is the best way to dump a guy?", "How can I get back together with him?", "I don’t think he loves me anymore. What should I do?", "Ask your own question"];
ab.dataProvider = questions_arr;
//var frameLabel:String = ab.selection.data;