I’d like to keep some ActionScript code in a text file so it is easy to update. I’ve been trying to make a test, but it doesn’t work. It traces correctly, but doesn’t launch the code. Here’s the code I’m using.
blahBlahText = new LoadVars();
blahBlahText.load("textDoc.txt");
blahBlahText.onLoad = function(loaded) {
if (loaded) {
launchCode = blahBlahText.launchCode;
button_mc.onRelease = function() {
launchCode;
trace(launchCode);
// trace returns:
// getURL("http://www.cnn.com", "_blank");
};
}
};
Somehow I need to activate the imported code?
Thanks for any help.
-pm