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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

override url embedded in swf banner ad

Status
Not open for further replies.

dragonwell

Programmer
Oct 21, 2002
863
US
Is there any way to override (in the HTML) the url that is specified in the call to getUrl() within a SWF?

We run banner ads on our site and have received some swf files from an advertiser. They put in their own click-to url, but we need the url to go somewhere else so we can track the click event, adn then redirect to the advertiser's link.

If there is not a way to override their embedded url, what is the standard practice for this situation?

Greetings,
Dragonwell
 
No way to override that URL.

It will have to be changed in the Flash by who ever created it. Alternatively they could make it dynamic so you could pass it into the Flash movie as a variable, but again that would require the originator of the Flash movie (.swf) to edit.

Hope it helps!

Wow JT that almost looked like you knew what you were doing!
 
You could possibly load this banner in another new document, and again (depending on how it was done...) possibly override that getURL with your own, but considering, it might be easier to just ask the client to provide you with a new banner, with the right getURL call!
 
I did some research and found that the standard is to use "clickTAG" as the argument you pass to getUrl, so that ad-serving networks can dynamically set the click-through url in ads. So the embed tag would contain something like
Code:
<EMBED src="htt://server/images/movie.swf?clickTAG=[URL unfurl="true"]http://www.someotherurl.com"[/URL]


Now, I 've just got to ask the advertiser to replace their hard-coded urls in the swl with "clickTAG".

In case anyone was wondering [glasses]



Greetings,
Dragonwell
 
OK - it's not working. Anyone have any ideas? (I'm not a Flash programmer.) The person who produced the file says they replaced the url with clickTAG. Now when I put the swf on my web page I use the following html
Code:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[URL unfurl="true"]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"[/URL] WIDTH="468" HEIGHT="60" id="59"><PARAM NAME=movie VALUE="[URL unfurl="true"]http://mydomain.com/Images/59.swf?clickTAG=http://mydomain.com/clicktracker.aspx?ad=59&page=3"><PARAM[/URL] NAME=quality VALUE=high><EMBED src="[URL unfurl="true"]http://mydomain.com/Images/59.swf?clickTAG=http://mydomain.com/clicktracker.aspx?ad=59&page=3"[/URL] quality=high WIDTH="468" HEIGHT="60" name="59" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="[URL unfurl="true"]http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>[/URL]

But when I click the ad, it just goes to "clickTAG" and I get a 404 error. So I guess it's not picking up the value of the clickTAG variable from the embed tag.

[pipe]
 
Is there any way you can get the code on the Flash button? What you have asked is kind of like trying to diagnose an engine problem by looking at the body of the car. :)

There is just no way to tell what exactly the problem is without the Actionscript that is on that button.

My bet is that the variable you are passing in is not being used correctly, but no way to tell for sure without seeing it.


Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top