Forum Moderators: open

Message Too Old, No Replies

How to a send someone to a webpage through my SWF file?

         

bobegods

5:09 pm on Apr 1, 2008 (gmt 0)

10+ Year Member



Alright here's the breakdown:

I maintain a website for a radio station. I have created a rotation flash file for when someone clicks on the "listen live" streaming audio link, the file pops up.

I need to know how to re-direct people from that flash file (immediately without closing the file) to the online streaming link.

In other words, you go to my website, click on LISTEN LIVE. Up pops a flash file and immediately your media player opens up. And at the same time you have my website, the flash file and media player.

Any help?

rocknbil

3:35 pm on Apr 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard bobegods, I'm a little confused as to why you'd need to use a media player if you're using Flash, you should be able to do all that within Flash itself.

But to answer your question, you'd create a transparent button over the visible area in your Flash object, then assign a handler to to the button:

my_button.onClick = function() { getURL(currentURL); }

"currentURL" in this case is a variable that can be a member in an array. So if your flash loads a video or sound from a list, you would have a list of URL's that would coincide with it, each URL would be unique to the sound.

bobegods

6:42 pm on Apr 2, 2008 (gmt 0)

10+ Year Member



Thanks for the help. However, I am aware of how to create a transparent button (or convert an image into a button) that sends you to a website when clicked on - my problem is that I want to open it up immediately, without having to click on anything.

Or if there is a way to stream live audio through flash that I'm also unaware of, that would be another good option.

drooh

7:22 pm on Apr 16, 2008 (gmt 0)

10+ Year Member



Can flash stream audio from a live source? if so how do you do it?

ag_47

5:15 pm on Apr 22, 2008 (gmt 0)

10+ Year Member



hey

Just go the frame you want, open up the action tab for this frame and use:

getURL("http://www.google.coom", "_new");

That's all :P

edit: although making the stream in flash seems like a much better idea. I suggest you use this method (of using wmp) for now - and work on a newer version using flash.