Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash Banners? 1

Status
Not open for further replies.

JohnStep

Programmer
Apr 19, 2000
190
US
When using a swf file as a banner for a website is there any way I can make the banner into a hyperlink? a href=http:\\ Does anyone know a way or can this be done?

Thanks in advance,

J Stephens
 
Hi

The Flash has its own area reserved in the middle of the HTML document. In that area, the Flash plug-in is the king, it receives all events does what it wants. The browser has no more words to say on what happens in that area. So you have to convince the Flash to handle the clicks and ask the browser load the desired document.

Or, you could put a transparent layer over the Flash banner.

As far as I know. For more and better answers ask this question in forum250 ( Macromedia Flash ).

Feherke.
 
As Feherke alluded to, the most common and simplest way would be to create the links within the Flash movie.

If you are concerned that you want the same movie to link to different site and don't want to create many instances of the movie then consider this:

Create the movie with a button that has a variable as the URL.
So, for example, the button has this actionscript attached to it:
Code:
on (release) {
	getURL(clickTAG,"_blank");
}

Then, when embedding your movie into the page you simply add the variable as a parameter to the URL for the movie, like so:

Code:
<object type="application/x-shockwave-flash" data="myMovie.swf?clickTAG=[URL unfurl="true"]http://www.anywhere.com"[/URL] width="350" height="350">
    <param name="movie" value="myMovie.swf?clickTAG=[URL unfurl="true"]http://www.anywhere.com"[/URL] />
    <param name="loop" value="false" />
    <param name="wmode" value="transparent" />
</object>

This method is well suited to making web banners that will need different URLs. Often this is the case when supplying banners to sites that use their own systems for tracking clicks etc. as they will need the banner to link to a script on their own site.

Foamcow Heavy Industries - Web design and ranting
Buy Languedoc wines in the UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top