Pedro.

The industry standard for banner ads is to have the click URL of a swf to be
passed as a Flashvar into the Flash file. The code to actually navigate to
the URL is inside the swf itself.

This is what the code inside the swf should look like (you have a button on
stage called "actionBtn", and this code goes on a frame action)

actionBtn.onRelease = function()
{
        getURL(clickTag, "_blank");
}


You then pass a clickTag value as a flashvar using swfobject:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en">
        <head>
                <title></title>
                <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
                <script type="text/javascript" src="swfobject.js"></script>
                <script type="text/javascript">
                        var flashvars = {};
                        flashvars.clickTag = "http://someother.com";;
                        var params = {};
                        var attributes = {};
                        swfobject.embedSWF("some.swf",
"myAlternativeContent", "300", "250", "8.0.0", false, flashvars, params,
attributes);
                </script>
        </head>
        <body>
                <div id="myAlternativeContent">
                        alt content
                </div>
        </body>
</html>




Regards,
Aran



-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of [email protected]
Sent: Wednesday, 28 January 2009 1:25 AM
To: SWFObject
Subject: Link to an embedded SWF


Hi everyone,

I have a series of Flash files that are mostly used as if they were
animated GIFs for a page that displays banners in different places.
Everything works great with swfobject except for the fact that I
cannot set a link to the embedded object. I am using the dynamic
method to embed the file but setting <a href=xx> before the code does
not help at all.

Does anybody know if there is a "trick" to make the embedded swfobject
clickable so that I can set a URL that gets called if somebody clicks
on the Flash animation?

Sorry if this is a really stupid question, but I have been fighting
with this problem for a couple of days and I am stuck...

Thanks a lot!

Regards,

Pedro



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to