473,651 Members | 3,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Add Rotator SWF Problem

Hi EveryBody,

Well I need your help about the Add Rotator.
I want to set the Advertisement File property of the Add Rotator set to
an XML File which contains info about the Adds.

Now Problem is that it does not play the .swf files, but only .gif
files. Code I got from Internet is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<Advertisements >

<Ad>
<ImageUrl>1.swf </ImageUrl>
<NavigateUrl www.google.com.pk </NavigateUrl>
<AlternateText> www.google.com. pk</AlternateText>
<Keyword>S</Keyword>
<Impressions>Fl ash Site</Impressions>
<Caption>The Elite News</Caption>
</Ad>

</Advertisements>

Kindly Help me to Solve this Problem.

Thanks in Advance.

Dec 23 '06 #1
2 2913
Unforunately, the adrotator only serves up images that use the image tag.
You can't put a flash animation in there as it requires a completely
different set of HTML to be generated. You can't use this control to render
anything but a standard bitmap image.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Muhammad Ahsin Saleem" <ah**********@g mail.comwrote in message
news:11******** *************@a 3g2000cwd.googl egroups.com...
Hi EveryBody,

Well I need your help about the Add Rotator.
I want to set the Advertisement File property of the Add Rotator set to
an XML File which contains info about the Adds.

Now Problem is that it does not play the .swf files, but only .gif
files. Code I got from Internet is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<Advertisements >

<Ad>
<ImageUrl>1.swf </ImageUrl>
<NavigateUrl www.google.com.pk </NavigateUrl>
<AlternateText> www.google.com. pk</AlternateText>
<Keyword>S</Keyword>
<Impressions>Fl ash Site</Impressions>
<Caption>The Elite News</Caption>
</Ad>

</Advertisements>

Kindly Help me to Solve this Problem.

Thanks in Advance.

Dec 23 '06 #2
Thanx Mark

Can u tell me about any other control build using the inheritance from
the orignal addrotator class?

I have one but that does not work well code for that Control is as
follows:
Imports System.Componen tModel
Imports System.Web.UI
Imports System.Web.UI.W ebControls
Imports System.Text
Imports System.Web
<DefaultPropert y("Text"), ToolboxData("<{ 0}:CAdRotator runat=" &
"""server"" " & "></{0}:CAdRotator> ")Public Class CAdRotator
Inherits System.Web.UI.W ebControls.AdRo tator
Private blnSWF As Boolean
Private strImgUrl As String
Private strNavUrl As String
Protected Overrides Sub Render(ByVal writer As
System.Web.UI.H tmlTextWriter)
If Me.blnSWF Then
Dim StringFormat As StringBuilder = New
StringBuilder(" <object
classid=""clsid :D27CDB6E-AE6D-11cf-96B8-444553540000"" ")

StringFormat.Ap pend("codebase= ""http://download.macrom edia.com/pub/shockwave/cabs/flash/swflash.cab#ver sion=6,0,29,0""
width={0} height={1}>")

StringFormat.Ap pend("classid=" "clsid:D27C DB6E-AE6D-11CF-96B8-444553540000""" )
StringFormat.Ap pend("<param name=""_cx"" value=""2646""
/>")
StringFormat.Ap pend("<param name=""_cy"" value=""2646""
/>")
StringFormat.Ap pend("<param name=""FlashVar s"" value=""""
/>")
StringFormat.Ap pend(" <param name=""movie"" value={2}>")
StringFormat.Ap pend(" <param name=""Src"" value={2}>")
StringFormat.Ap pend(" <param name=""WMode""
value=""Window" ">")
StringFormat.Ap pend(" <param name=""Play"" value=""-1"">")
StringFormat.Ap pend(" <param name=""Loop"" value=""-1"">")
StringFormat.Ap pend(" <param name=""Quality" "
value=""High""> ")
StringFormat.Ap pend(" <param name=""SAlign""
value=""LT"">")
StringFormat.Ap pend(" <param name=""Menu"" value=""-1"">")
StringFormat.Ap pend(" <param name=""Base"" value="""">")
StringFormat.Ap pend(" <param name=""AllowScr iptAccess""
value=""always" ">")
StringFormat.Ap pend(" <param name=""Scale""
value=""ExactFi t"">")
StringFormat.Ap pend(" <param name=""DeviceFo nt""
value=""0"">")
StringFormat.Ap pend(" <param name=""EmbedMov ie""
value=""0"">")
StringFormat.Ap pend(" <param name=""BGColor" "
value="""">")
StringFormat.Ap pend(" <param name=""SWRemote ""
value="""">")
StringFormat.Ap pend(" <param name=""MovieDat a""
value="""">")
StringFormat.Ap pend(" <param name=""Seamless Tabbing""
value=""1"">")
StringFormat.Ap pend(" <param name=""Profile" "
value=""0"">")
StringFormat.Ap pend(" <param name=""ProfileA ddress""
value="""">")
StringFormat.Ap pend(" <param name=""ProfileP ort""
value=""0"">")
StringFormat.Ap pend(" <param name=""AllowNet working""
value=""all"">" )
StringFormat.Ap pend(" </object>")
Dim OutPutString As StringBuilder = New StringBuilder()
OutPutString.Ap pendFormat(Stri ngFormat.ToStri ng, 468, 60,
Me.ImageUrlFiel d, Me.ImageUrlFiel d)
writer.Write(Ou tPutString.ToSt ring)
Else
MyBase.Render(w riter)
End If
End Sub
Protected Overrides Sub OnAdCreated(ByV al e As AdCreatedEventA rgs)
MyBase.OnAdCrea ted(e)
If e.ImageUrl.ToLo wer().IndexOf(" .swf") <-1 Then
Me.blnSWF = True
Me.strImgUrl = e.ImageUrl
Me.strNavUrl = e.NavigateUrl
Else
Me.blnSWF = False
End If
End Sub
End Class
Kindly adjust it or just tell me about any orher link.

Dec 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1959
by: Carolyn Gill | last post by:
It was working fine on the test server. loaded it onto iis6 server after installing php and got everything working (after redirecting it to the correct directory) except for 1 annoying error that I don't understand. Any help would be appreciated - the sooner the better so I can get some sleep tonight! Undying gratitude to anyone willing to help a php beginner! here's the page with the error http://www.ioworldwide.com/ and...
1
1674
by: jonathanthio | last post by:
How do I create a page rotator? Is there a script for that? Also is there a way to do a page rotator that's not random but based on cookies. For example, if a new person see my website, it'll go to my website. If he visits my website a second time, it'll go to a traffic exchange website. Can that be done?
4
2194
by: Leon | last post by:
I need an ad management system that record impressions and clicks as well as display gif, jpeg, and flash banners. I don't mind trying to build it myself, but I'm kind of press for time. do anyone know of any good pre-built ..net ad rotator managements components or system ("anything") that will handle this task or should I just go-far coding it myself?
2
2144
by: Bredahl jensen | last post by:
Hello, Where can i find a dynamic content rotator. The asp.net server control only show the next content when page has refreshed. But this is boring to me. I'm not the javascript /dhtml expert and i 'm wondering if there is any available code for this somewhere. Alternatively , is there a commercial solution not too expensive? I have found two so far (ComponentArt www.componentart.com/ Telerik
3
1658
by: Mark A. Sam | last post by:
Hello, Does anyone know of a third party ad rotator that automatically changes the images? It seems like the ad rotator in that comes with Visual Web Developer changes images only when the pages is refreshes. Is that correct? Thank you and God Bless, Mark A. Sam
0
1240
by: Mat | last post by:
ASP:Rotator It would be nice to have an expire date in the XML input to the banner rotator. so you dont have to remove an entry to it at a certain date
2
2593
by: kwenterprise | last post by:
Hello All, I am normally great at figuring out ways around iframe issues that frustrate us all. I am using javasript to try and break an iframe that I have a banner rotator embedded in but it is not working. I want visitors to click the banners and actually be taken to those pages instead of the new page being stuck in the iframe. What ever the case when I click on any banner, it opens the url right there inside the frame instead of...
0
1033
by: CoolForU | last post by:
hi i use no. ad rotator which is fetch data from data base. i want to find that how much user hit a particular ad per day . can do this using ad rotator . any one tell me how to do this . thanks
0
8361
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8807
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5615
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.