Search Tutorials
Loading text file information into the ComboBox componentDrag a ComboBox component onto frame 3 of the Combo layer and give it an instance name of CBOLoadSites. We'll use actionscript to load the variables from the text file into the ComboBox. The Sites and URLs variables contain multiple pieces of information separated by commas. Individual sites and URLs will be separated into arrays using split, shown below.
var ComboSites = sitestext.Sites.split(",");
We'll add a default item to the ComboBox.
CBOLoadSites.addItem("-- select site --");
Then we'll loop through the array and assign each site and URL to the ComboBox
as shown below. The first value in the addItem method is the label and the second
is the data.
for (i=0; iTest your movie and you should see the ComboBox populated with the Sites and URLs from the text file.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|