Just referencing your need for clicking Flash movies....
I just happened to be doing something similar for a client Craig. My
solution isn't necessarily ideal, but it works.
You need to be aware of a few things:
1. If you are relying on the Flash element being clickable, then you need
to have control over the mouseclick events in the Flash movie. Doing a
google search for "how do I make a flash movie a hyperlink" will get you
plenty of information on how to do that. I'm not aware of a way through
just HTML to make a generic Flash movie clickable, although if I were to try
and do something it would be putting a transparent div OVER the flash movie
and then capturing the clicks on that div. If you needed those clicks to be
passed through to your underlying SWF, then you'd have to create a mechanism
via Javascript->Actionscript that would perform the equivalent actions, I
would think. But that's just a guess.
2. What I end up doing, which is slightly inaccurate is that I record
clicks via <img> or <script> tags on the landing page in question. While
it's true that clicks are going to be > actual hits on the landing page due
to people timing out or just changing their minds, it's generally a static
enough percentage that the clicks = hits on the redirect.
So... you can just "lie" and say that a click action is equal to someone
hitting your landing page and just have an impression pixel on that side of
things.
Or... you can go through the process of 1. And then add an AJAX call that
is invoked by your Actionscript from your Flash movie (or the clicks on the
div) that says $.load("trackingurl?id=foo");*
The problem with doing that is that unless you wait for the AJAX call to
complete before you move on to another page, the context of the request
might be broken, and I'm not sure whether or not the server will register
the page call or not. This is why I prefer method #2. It's less
complicated.
Hope this helps. Since this isn't a forum for AJAX and pixel tracking and
what-not, you might want to write me under separate copy if you need to
discuss further.
Cheers!
Vincent
* First for AJAX calls, I turn to the trusted jQuery library. It has some
pretty basic functions that make ajax calls a snap. In particular, there is
a function called $.load(url) that you can use.
On Tue, Jul 21, 2009 at 8:53 AM, Getify Solutions, Inc. <[email protected]>wrote:
>
> For #1, this is a Javascript question, best directed at a different forum.
> Or it's a flash question, if you want to embed your calls inside your
> Flash.
> In which case you should check out actionscript.org or kirupa.com.
>
> For #2, you might have CSS on the page that is overriding the SWF's
> properties?
>
> --Kyle
>
>
>
>
> --------------------------------------------------
> From: "Craig" <[email protected]>
> Sent: Tuesday, July 21, 2009 10:49 AM
> To: "SWFObject" <[email protected]>
> Subject: Click tracking on Flash Banners
>
> >
> > Hi, I'm just building an ad rotator which can put up the usual
> > graphics files and .swf files. I've just come accross the SWFObject so
> > I'm using the latest version. I'm having two issues:-
> >
> > 1) I don't know how to add a javascript call to an AJAX call which
> > will record the click. It the mechanism works fine in an href around
> > an img tag but not when the img is replaced by SWFObject.
> >
> > 2) When I tried to replace the content of a div using SWFObject, the
> > resulting flash file didn't respect the height and width detailed in
> > the initialisation:-
> >
> > swfobject.embedSWF('../<?php echo $resourceAddress; ?>',
> > 'showBannerDiv', '468', '60', '9.0.0', '../images/
> > expressInstall.swf');
> >
> > Any advice would be appreciated.
> >
> > Craig
> > >
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---