-
Random Link in Flash
How do you create a random link button in Flash? I guess I would need an actionscript code or something of that nature. I already know how to set up a random link in HTML. Thanks
-
FK's Wave Pimp
You could do something like this on a button symbol.
code:
on (release) {
link0 = "http://flashkit.com";
link1 = "http://yahoo.com";
link2 = "http://google.com";
link3 = "http://thekamyab.com";
getURL(eval("link"+random(4)), "_blank");
}
-
Flashkit Veteran
do you really need the eval?
-
FK's Wave Pimp
Yes I do
-
yes, but how do you adjust it so that it opens in the same window?
-
FK's Wave Pimp
The last line.. the getURL function. Change _blank to _self.
-
nevermind, i just got it:
on (release) {
link0 = "http://flashkit.com";
link1 = "http://yahoo.com";
link2 = "http://google.com";
link3 = "http://thekamyab.com";
getURL(eval("link"+random(4)), "_self");
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|