Topic: Updating Flash controls based on root params?
I have a widget configuration movie that stores the value of a checkbox and radio button group through the standard method shown in the sample banner widget. This works fine, storing the states as true/false when "Done" is pressed. And when I reload the widget configuration the correct states are read back from _root.params. All good so far!
Next, using an onEnterFrame function, I set the value (for the checkbox) and selected (for the radio buttons) properties as required. This is where my problem lies - it works in the Flash IDE (as far as I can tell as I can't read the root params but go with default values) but not when it's on Chumby.com - leaving me stumped.
Any ideas?
Here's my code as it stands:
this.onEnterFrame = function() {
pagelistInput.text = _root.params['pagelist'];
slideshowPref = _root.params['slideshow'];
if (slideshowPref == undefined) {
slideshowCheckbox.value = true; //default value for checkbox
} else {
slideshowCheckbox.value = slideshowPref;
}
if (_root.params['random'] == undefined) randomFeature = true; //default value for radio button
if (randomFeature == true) {
randomRadio.selected = true;
disableInput();
} else {
userRadio.selected = true;
enableInput();
}
delete this.onEnterFrame;
}