Forum Moderators: open
I am working on a new feature for my website. The site utilizes changing content. I want my users to be able to click a flash based link and have the button bring them to a URL that is defined in a text file. I know that XML works wonders in this situation but unfortunately I am not able to use it for this project because it is not supported.
Does anyone know how I can specify a link or button as a variable?
And I love your forum. It's a great community. I've used it many times but never joined until just now. It's been a long time in the making.
I am also interested in adding a photo where the URL can be a variable too, but the buttons are the most important. Thank you again.
What makes you say XML is unsupported? I remember using it since FlashMX, and pretty sure Flash supported it before that . . . I cannot imagine why it wouldn't work as if it's something to do with the server configuration, it's not the server that's parsing the XML, it's Flash.
Which prompts the next question, what is your development environment? The answers may have slight variations depending on Flash version.
Does anyone know how I can specify a link or button as a variable?
I am also interested in adding a photo where the URL can be a variable too
It can be cobbled together using a combination of flashVars and getURL, but I would hit the XML import methods for both of these. You craft an XML file that holds the info in various nodes, then dump the data into arrays within Flash when the XML is loaded. A typical example for both these instances is a Flash slide show with captions.
Then you go back and build an admin interface that actually writes the XML file so the client can configure it and change it at will. Then you're a star. :-)
I looked up an old thread about building a Flash slide show using XML import methods. For your perusal, look at post #2 and see how easy it can be [webmasterworld.com].