Hi,
I have an idea for a script which would construct a small gallery from information in a database. The method would involve creating an ASP page which dynamically writes an actionscript function to generate my gallery items.
Is it possible to load a script from an outside text file? Could I, for example use the loadVars object to load in the information that is used to define the function?
Say for example I had an external file like this:
[font=Courier New] functionscript = “() {do these actions}”
[/font]
which makes the functionscript variable the second half of a function creation command. I could then create a function object based on that info:
[font=Courier New]
function myFunction functionScript[/font]
which gives
function myFunction = () {do these actions}
In other words, I’m loading in a string from a text file using the loadvars object, and tagging that onto the creation of a function.
Can anyone see a reason why this wouldn’t work?