mrbirtch
09-12-2006, 01:07 PM
I am having some trouble with combo boxes. Here is the situtation:
I have a parent .swf that loads a single child .swf and that child .swf then loads multiple children swfs of it's own. On each of the deepest level children, I have two combo boxes (located inside and mc on main timeline) that when user selects an item from it, then calls fscommand and launches a .bat file
I had to put a copy of the combo box from the library into the main parent's library for the combo boxes to work at all. Now that I've done that, all the combo boxes are showing the correct data and labels and dropdown fine.
However, The second combo box only launches correctly on one of the children swfs. I have used essentially the same code on all children combo boxes and I have checked that all the data points to the correct .bat file, and it does.
Here is the code I've used for the second combo box on all children
weekly_cb.textField.label.embedFonts = true;
weekly_cb.setStyle("fontFamily","Verdana");
weekly_cb.setStyle("fontSize","10");
function change(evt){
trace(evt.target.selectedItem.data);
fscommand("exec",evt.target.selectedItem.data);
}
weekly_cb.addEventListener("change", this);
And here is the data from the one that works:
defaultValue,ontarioReport_week1.bat,ontarioReport _week2.bat,ontarioReport_week3.bat,ontarioReport_w eek4.bat,ontarioReport_week5.bat,ontarioReport_wee k6.bat,ontarioReport_week7.bat,ontarioReport_week8 .bat........
And here is the data from the one that doesnt work:
defaultValue,bcReport_week1-8.bat,bcReport_week9-11.bat
So the data in the combobxes are different for different children, but the code and structure of the file is exactly the same. The only thing I can think of is that .bat files can't have a hyphen?
Has anyone ever had a similar situation? I hope this isn't too confusing.
I have a parent .swf that loads a single child .swf and that child .swf then loads multiple children swfs of it's own. On each of the deepest level children, I have two combo boxes (located inside and mc on main timeline) that when user selects an item from it, then calls fscommand and launches a .bat file
I had to put a copy of the combo box from the library into the main parent's library for the combo boxes to work at all. Now that I've done that, all the combo boxes are showing the correct data and labels and dropdown fine.
However, The second combo box only launches correctly on one of the children swfs. I have used essentially the same code on all children combo boxes and I have checked that all the data points to the correct .bat file, and it does.
Here is the code I've used for the second combo box on all children
weekly_cb.textField.label.embedFonts = true;
weekly_cb.setStyle("fontFamily","Verdana");
weekly_cb.setStyle("fontSize","10");
function change(evt){
trace(evt.target.selectedItem.data);
fscommand("exec",evt.target.selectedItem.data);
}
weekly_cb.addEventListener("change", this);
And here is the data from the one that works:
defaultValue,ontarioReport_week1.bat,ontarioReport _week2.bat,ontarioReport_week3.bat,ontarioReport_w eek4.bat,ontarioReport_week5.bat,ontarioReport_wee k6.bat,ontarioReport_week7.bat,ontarioReport_week8 .bat........
And here is the data from the one that doesnt work:
defaultValue,bcReport_week1-8.bat,bcReport_week9-11.bat
So the data in the combobxes are different for different children, but the code and structure of the file is exactly the same. The only thing I can think of is that .bat files can't have a hyphen?
Has anyone ever had a similar situation? I hope this isn't too confusing.