Forum Moderators: open

Message Too Old, No Replies

Linking a URL to a Flash button through XML

         

jqsmack

9:07 pm on Jul 7, 2005 (gmt 0)

10+ Year Member



I want to create a button in flash that is linked to a URL, but I want to be able to change the URL through XML anytime I want. Is this possible? I dont want to use a dynamic text box, just an invisible box (alpha =0).

How might I layout the action script for that?

choster

2:35 pm on Jul 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This looks like an Flash/Actionscript question, not an XML question-- since there's no moderator here maybe you could try there.

benihana

3:22 pm on Jul 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you dont have to use xml for this.

You can use loadVars to get the url from a plain text file and apply that to a button.

Alternatively, you can pass the url as a variable in the <param> and <embed> tags that put the flash into your page.

eg.

<param value="mymovies.swf?url=http://www.myurl.com">

then in the AS something like:

mybutton.onRelease {
getURL(url);
}

*youll need to check the syntax on that though