-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathCountryList.as
More file actions
32 lines (26 loc) · 826 Bytes
/
CountryList.as
File metadata and controls
32 lines (26 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package PopButtonCreator
{
import contents.TextFile;
import flash.filesystem.File;
import popForm.PopButtonData;
public class CountryList
{
private static var creator:GlobalButtonCreator ;
public static function setUp(xmlTarget:String="Data/countries.xml",buttonFrame:uint=2):void
{
creator = new GlobalButtonCreator(xmlTarget,buttonFrame);
/*countriesXML = XMLList(TextFile.load(File.applicationDirectory.resolvePath(xmlTarget)));
buttons = new Array();
for(var i = 0 ; i<countriesXML.length();i++)
{
var newCountry:PopButtonData = new PopButtonData(countriesXML[i].@name,buttonFrame,String(countriesXML[i].@code));
buttons.push(newCountry);
}
buttons.sortOn("title");*/
}
public static function countrieButtons():Array
{
return creator.buttonsList() ;
}
}
}