Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

CSS and/or iframes and Centered Flash

Posted 01 Apr 2005 21:33:44
1
has voted
01 Apr 2005 21:33:44 jefferis peterson posted:
I am starting to appreciate the elegance of CSS after months of
curmudgeoning complaints, and I am interested in some advice for some new
clients. For years, because of detection methods and modem speed issues for
a percentage of consumers, I have used dual sites with Flash as either low
bandwidth ornaments or as separate options. With the ubiquity of Flash
players now, it seems almost pointless to restrict Flash to an either/or
option.

Many sites, like:

www.zdnet.com/
[today's ad is for verisign]
Have flash ads embedded into their pages, but if flash doesn't exist or you
have plugins disabled, they have created just a blank space that doesn't do
too much damage to the page layout.

However, I've found on some stock investment pages some neat coding that
seems to either feed a static gif or a flash, and I am assuming it is via a
detection method, but I am not sure. The placeholder seems to be a gif but
the actual ad is a swf.
Today's page, e.g.,
www.investors.com/default.asp

Has a right column ad for TD Waterhouse, but often they have a center square
ad for someone like Ameritrade with a link to a streaming server but no
object/embed tags.

The ad is tagged with a script I believe followed by its CSS placement:
> <table border="0" cellpadding="0" cellspacing="0" width="128">
> <tr>
> <td align="center">
> <SCRIPT LANGUAGE=JavaScript><!--
> OAS_AD('Right1');
> //--></SCRIPT>
> </td>
> </tr>
> </table>

(See the full header script below).

What I would like to do is institute a similar type of swf placement for my
clients that would be similar in placement to an iframe to integrate into
the overall design, but what I'd want to do is have a detection substitute a
gif only in that area if the detection for flash comes up empty. In the
early versions of flash, it would actually create for you a gif or jpg
rollover alternate for you, but seems to be a long gone feature. (Perhaps
some of these features are already available in the Flash Pro 2004 Ad
templates, but I am not sure). Any advice would be appreciated in figuring
out how to accomplish this layout most effectively. Don't know if iframes
are still acceptable or if CSS is a better alternative, etc. But also want
to know if a detection scheme can be used in CSS or if it requires an
iframe, etc.

Today on CBS Marketwatch there is a similar code which seems also to use
doubleclick and real media and IFRAMES, even though flash is the item
playing:

www.marketwatch.com/news/default.asp?siteid=&avatar=seen&dist=ctmw

> <div id="right"><div class="column-in">
> <div id=rmwad style="width:300;text-align:center;"><div align=right><a
> href="cbs.marketwatch.com/avatar.asp"><img
> src="a.mktw.net/MarketWatch/ReplayLink/replay_rmw.gif" border="0"
> width="106" height="18" /></a></div>
> <IFRAME
> SRC="ad.doubleclick.net/adi/N3382.CBSMarketWatch/B1519570.3;sz=300x250;
> ord=26600?" WIDTH=300 HEIGHT=250 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0
> VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'>
> <SCRIPT language='JavaScript1.1'
> SRC="ad.doubleclick.net/adj/N3382.CBSMarketWatch/B1519570.3;abr=!ie;sz=
> 300x250;ord=26600?">
> </SCRIPT>
> <NOSCRIPT>
> <A
> HREF="www.marketwatch.com/RealMedia/ads/click_lx.cgi/cbs.marketwatch.co
> m/frontpage/default.asp/26600/Frontpage/MarketWatch/Etrade31_0503_MW_IM_RMW/ET
> rade31_0503_MW_IM_RMW.html/31386566323362383431663731363930?">
> <IMG
> SRC="ad.doubleclick.net/ad/N3382.CBSMarketWatch/B1519570.3;abr=!ie4;abr
> =!ie5;sz=300x250;ord=26600?" BORDER=0 WIDTH=300 HEIGHT=250></A>
> </NOSCRIPT>
> </IFRAME>


Thanks all.




>From the Investors site:
> <SCRIPT LANGUAGE=JavaScript><!--
> //configuration
> OAS_url = 'oascentral.investors.com/RealMedia/ads/';
> //OAS_sitepage = window.location.hostname + window.location.pathname;
> OAS_sitepage = 'investors/homepage'
> OAS_listpos =
> 'Top1,Top2,TopLeft,TopRight,Right1,Left1,Right2,x02,x03,x04,Bottom2,Bottom3'
> if('' != '')
> { OAS_query = ''; }
> else
> { OAS_query = ''; }
> OAS_target = '_top';
> //end of configuration
> OAS_version = 10;
> OAS_rn = '001234567890'; OAS_rns = '1234567890';
> OAS_rn = new String (Math.random()); OAS_rns = OAS_rn.substring (2, 11);
> function OAS_NORMAL(pos) {
> document.write('<A HREF="' + OAS_url + 'click_nx.ads/' + OAS_sitepage + '/1'
> + OAS_rns + '@' + OAS_listpos + '!' + pos + '?' + OAS_query + '" TARGET=' +
> OAS_target + '>');
> document.write('<IMG SRC="' + OAS_url + 'adstream_nx.ads/' + OAS_sitepage +
> '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + '?' + OAS_query + '"
> BORDER=0></A>');
> }
> //--></SCRIPT>
>
> <SCRIPT LANGUAGE=JavaScript1.1><!--
> OAS_version = 11;
> if (navigator.userAgent.indexOf('Mozilla/3') != -1 ||
> navigator.userAgent.indexOf('Mozilla/4.0 WebTV') != -1)
> OAS_version = 10;
> if (OAS_version >= 11)
> document.write('<SCR' + 'IPT LANGUAGE=JavaScript1.1 SRC="' + OAS_url +
> 'adstream_mjx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '?'
> + OAS_query + '"><\/SCRIPT>');
> //--></SCRIPT>
>
> <SCRIPT LANGUAGE=JavaScript><!--
> document.write('');
> function OAS_AD(pos) {
> if (OAS_version >= 11)
> OAS_RICH(pos);
> else
> OAS_NORMAL(pos);
> }
> //--></SCRIPT>


~~~~~~~~~~~~
Jefferis Peterson, Pres.
Web Design and Marketing
www.PetersonSales.com


Replies

Replied 04 Apr 2005 14:37:54
04 Apr 2005 14:37:54 Matt Bailey replied:
I don't know how to do what you asked, but I came across this article which may help:

blog.deconcept.com/2004/10/14/web-standards-compliant-javascript-flash-detect-and-embed/

___________________________________
* Sorry... how do you do that again?... *

Reply to this topic