I agree with what Sam is saying.

The original js script is not designed to handle swf files at all, so you
will have a lot of re-writing ahead of you to shoehorn is Flash files into
the workflow.

If you need to sometimes load swfs and sometimes use images for your ads,
then it is probably a good idea to use one shell swf (JW iamge rotator etc),
and have an XML file which describes the image/swf location and the
clickthrough URL etc.


Cheers,
Aran



On Wed, Nov 25, 2009 at 3:20 AM, Sam Sherlock <[email protected]>wrote:

> all this seems very complicated and excessive too.
>
> If you used a banner rotation swf that uses xml to set the content that
> would achieve the banner roation (swf gif png & jpg wouold all be fine)
>
> So I would use something like the JW Image rotator or slideshowpro
>
> also you could use the extended swfobject api to supply something like
> jquery cylce plugin to display the same xml file (skipping the swfs)
>
>
>
> - S
>
>
>
>
> 2009/11/24 craftne <[email protected]>
>
> Hello all, Hello Aran,
>>
>> I have an swf file to play in a series of rotating banners. I know I
>> need to place the swfobject script embedded in the script somehow, but
>> can't fathom how to do that.
>>
>> Can anyone help me?
>>
>> Since this is on a development site, I will post my code here.
>>
>> THE BANNERUP.JS SCRIPT
>> <code>
>> // JavaScript Document
>>
>> var image = "";
>> var banners = 0;
>> //var banner1 = image;
>>
>> function cycle() {
>>  if (++ banners > 5) banners = 1;
>>    loadBanners();
>>    document.banner1.src = image;
>>
>>
>>    window.setTimeout( 'cycle();' , 7000 );
>>  }
>>
>>
>> function loadBanners() {
>>   if (banners==1)
>>      {
>>      image="/files/banners/2009_IMD_banner.swf";
>>      }
>>   if (banners==2)
>>      {
>>      image="/files/banners/icnm.jpg";
>>      }
>>   if (banners==3)
>>      {
>>      image="/files/banners/2009-Springer-banner.jpg";
>>      }
>>   if (banners==4)
>>      {
>>      image="/files/banners/studysmart.jpg";
>>      }
>>   if (banners==5)
>>      {
>>      image="/files/banners/2009-Springer-allied-banner.jpg";
>>      }
>> }
>>
>>
>> var link = "http://www.radio1812.net/en/themes/
>> international_migrants_day"
>>
>> function urlSwitch() {
>> if (banners==1)
>>        {
>>        link = "http://www.radio1812.net/en/themes/
>> international_migrants_day";
>>        }
>> if (banners==2)
>>        {
>>        link = "http://www.intlnursemigration.org";;
>>        }
>> if (banners==3)
>>        {
>>        link = "http://www.springerpub.com/cgfns-nurses";;
>>        }
>> if (banners==4)
>>        {
>>        link = "https://www.cgfnsstore.org/index.php?
>> main_page=product_info&products_id=207<https://www.cgfnsstore.org/index.php?main_page=product_info&products_id=207>
>> ";
>>        }
>> if (banners==5)
>>        {
>>        link = "http://www.springerpub.com/cgfns-allied";;
>>        }
>> return link;
>> }
>>
>> /* Banner Up! - Improve your batting average with real-time banner
>> rotation. Copyright 1999 By Heidi Allen */
>> </code>
>>
>> THE FOOTER CODE
>> <code>
>> </td>
>>
>> <td class="banner" align="right" valign="top">
>> <script type="text/javascript">swfobject.registerObject("myFlashIMD",
>> "8.0.0");</script>
>>
>>        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>> width="120" height="600" id="myFlashIMD">
>>                                <param name="movie"
>> value="/files/banners/2009_IMD_banner.swf" />
>>                                <param name="play" value="true" />
>>                                <param name="loop" value="false" />
>>                                <param name="menu" value="false" />
>>                                <param name="quality" value="autohigh" />
>>                                <param name="scale" value="noscale" />
>>                                <param name="wmode" value="transparent" />
>>                                <param name="allowfullscreen" value="false"
>> />
>>                                <!--[if !IE]>-->
>>                                <object
>> type="application/x-shockwave-flash" data="/files/banners/
>> 2009_IMD_banner.swf" width="120" height="600">
>>                                        <param name="play" value="true" />
>>                                        <param name="loop" value="false" />
>>                                        <param name="menu" value="false" />
>>                                        <param name="quality"
>> value="autohigh" />
>>                                        <param name="scale" value="noscale"
>> />
>>                                        <param name="wmode"
>> value="transparent" />
>>                                        <param name="allowfullscreen"
>> value="false" />
>>                                <!--<![endif]-->
>>                                        <a href="
>> http://www.adobe.com/go/getflashplayer";>
>>                                                <img src="
>> http://www.adobe.com/images/shared/download_buttons/
>> get_flash_player.gif<http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif>"
>> alt="Get Adobe Flash player" />
>>                                        </a>
>>                                <!--[if !IE]>-->
>>                                </object>
>>                                <!--<![endif]-->
>>                        </object>
>>
>> <a href="/dummy.shtml" onclick="this.href=urlSwitch()"><img
>> width="120" height="600" border=0 src="/files/banners/
>> 2009_IMD_banner.swf" name="banner1" /></a>
>>
>> </td>
>> </tr>
>> </table>
>>
>> <div id="footernew">
>> <div id="footercenter">
>> <p class="spaceafter"><a href="/sections/privacy/">Privacy Policy</a>
>>  | <a href="javascript:openPopUp('https://www.cgfns.org/
>> contact/') <https://www.cgfns.org/contact/')>;">Contact Us</a>
>>  | ©2006 – 2009 CGFNS International<sup style="font-size:
>> 60%;">®</sup>
>>  | All rights reserved.</p>
>> </div></div>
>> </body>
>> </html>
>> </code>
>>
>> THE JAVASCRIPT IN THE HEADER
>> <code>
>> <script src="/files/js/popup.js" type="text/javascript"></script>
>> <script src="/files/js/bannerup.js" type="text/javascript"></script>
>> <script src="/files/js/swfobject.js" type="text/javascript"></script>
>> </head>
>> <body onload="window.setTimeout('cycle();', 7000); (loadBanners());
>> (urlSwitch());">
>> </code>
>>
>> cheers,
>> Nancy
>>
>> --
>>
>> 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]<swfobject%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/swfobject?hl=en.
>>
>>
>>
>  --
> 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]<swfobject%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/swfobject?hl=en.
>

--

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