Re: Ad Rotator - My guess is that you'll need to do something like this:
<div id="AdContainer">
<div id="FlashAd"></div>
</div>
<script type="text/javascript">
$("AdContainer").click ---> override the click or put onclick on the div
itself.
</script>
I was still tired when I wrote my original reply, but you should be able to
trap clicks in a container div. So your SWFObject will replace the FlashAd
div, but clicks will still be captured by the enclosing div AdContainer.
Based on this you should be able to then have your clickthrough action
submit a click to your serverside tracking page of choice and/or simply
redirect to your serverside tracking page which then redirects to the
landing page you specify. You can accomplish this in a variety of ways,
either loading a tracking pixel into a div that is either offscreen
(x:-1000px, y:-1000px) or again just redirecting the user to a script that
knows where to send the user after it's done it's tracking.
Yes, SWFObject2 replaces the entire div as opposed to inserting the content
inside an existing div. It is a fundamental change from the way they did
things in 1.5, and I for one can't stand the notion, but I'm assured
everytime I complain that there were good reasons for it. :) I hate it
because as you see, you have to create a container div in addition to a
placeholder div for every flash movie that you create if you want some
semblance of control above and beyond what the Flash movie itself may try to
assert.
You asked the question: why bother specifying styles for the div. Why
indeed? Well, the typical reason I've seen is that people typically want to
control their layout, so in the event that the Flash movie doesn't load,
specifying the width/height and other css properties before hand makes it so
that you don't break the layout when you load the alternative content in.
SWFObject doesn't just fill the div, it completely destroys the div and
replaces it with a new one with the same name. So any css properties that
were defined say, inline, I believe go *poof*.
Re: Forum relevance. We try to keep things on topic to issues directly
relating to SWFObject and just being able to implement it. SWFObject all it
really does at the end of the day is provide an cleaner cross-browser mostly
HTML compliant way of embedding Flash movies. It's designed as a
placeholder until the HTML standards bodies can get their collective ducks
in a row. So most of the time we talk about specific problems people are
having with specific implementations. While your problem is more of a
general flash embed question, it's certainly not inappropriate, but there
are probably other groups that could give you a better focused answer. No
worries either way.
Re: assumption about movie size. I generally specify both the width and
height of a container AND the width and height in the parameters.
Doubleboxing your swf will assure that the size is what you want it to be.
Having a secondary box also allows me to do text and layout if I want to
around the SWF being loaded (i.e. a headline and maybe an X in the upper
right hand corner to close the swf, for example).
Hope this helps,
Vincent
On Tue, Jul 21, 2009 at 10:27 AM, Craig <[email protected]> wrote:
>
> Thanks for the replies.
>
> The reason I posted to this forum is because it appears that it's the
> interaction between the embedding method and the rest of the page that
> appears to be the issue.
>
> The ad rotator will take uploaded flash banners from various sources,
> not built by me or my clients. Therefore we need to be able to
> independently measure the click-throughs. The landing pages will be
> off site. Some of the Flash banners might have their own, inbuilt off
> site links, we still need to know if they've been clicked.
>
> I am using the JQuery AJAX in the CMS but not on the live site as it's
> too heavy for what's needed. I have my own, very light weight
> implementation for that.
>
> As for CSS on the page overriding the SWF's properties, it appears to
> be the other way round, which is the reason for the question. The
> Flash just fills the whole div. If that's "as design" then why bother
> with instantiating the height and width in the swfobject call? I
> suppose all I really need to know is, am I approaching it the wrong
> way by assuming the height and width of the rendered movie will be
> controlled by the swfobject call or do I need to make sure it gets
> dropped into a sized container?
>
> So you see, it's all about what you can or can't do with an embedded
> flash movie, totally disregarding the flash movie itself. Very
> pertinent to this forum I thought.
>
> Regards,
>
> 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
-~----------~----~----~----~------~----~------~--~---