473,386 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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>Flash Site</Impressions>
<Caption>The Elite News</Caption>
</Ad>

</Advertisements>

Kindly Help me to Solve this Problem.

Thanks in Advance.

Dec 23 '06 #1
2 2903
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**********@gmail.comwrote in message
news:11*********************@a3g2000cwd.googlegrou ps.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>Flash 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.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Text
Imports System.Web
<DefaultProperty("Text"), ToolboxData("<{0}:CAdRotator runat=" &
"""server""" & "></{0}:CAdRotator>")Public Class CAdRotator
Inherits System.Web.UI.WebControls.AdRotator
Private blnSWF As Boolean
Private strImgUrl As String
Private strNavUrl As String
Protected Overrides Sub Render(ByVal writer As
System.Web.UI.HtmlTextWriter)
If Me.blnSWF Then
Dim StringFormat As StringBuilder = New
StringBuilder("<object
classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" ")

StringFormat.Append("codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0""
width={0} height={1}>")

StringFormat.Append("classid=""clsid:D27CDB6E-AE6D-11CF-96B8-444553540000""")
StringFormat.Append("<param name=""_cx"" value=""2646""
/>")
StringFormat.Append("<param name=""_cy"" value=""2646""
/>")
StringFormat.Append("<param name=""FlashVars"" value=""""
/>")
StringFormat.Append(" <param name=""movie"" value={2}>")
StringFormat.Append(" <param name=""Src"" value={2}>")
StringFormat.Append(" <param name=""WMode""
value=""Window"">")
StringFormat.Append(" <param name=""Play"" value=""-1"">")
StringFormat.Append(" <param name=""Loop"" value=""-1"">")
StringFormat.Append(" <param name=""Quality""
value=""High"">")
StringFormat.Append(" <param name=""SAlign""
value=""LT"">")
StringFormat.Append(" <param name=""Menu"" value=""-1"">")
StringFormat.Append(" <param name=""Base"" value="""">")
StringFormat.Append(" <param name=""AllowScriptAccess""
value=""always"">")
StringFormat.Append(" <param name=""Scale""
value=""ExactFit"">")
StringFormat.Append(" <param name=""DeviceFont""
value=""0"">")
StringFormat.Append(" <param name=""EmbedMovie""
value=""0"">")
StringFormat.Append(" <param name=""BGColor""
value="""">")
StringFormat.Append(" <param name=""SWRemote""
value="""">")
StringFormat.Append(" <param name=""MovieData""
value="""">")
StringFormat.Append(" <param name=""SeamlessTabbing""
value=""1"">")
StringFormat.Append(" <param name=""Profile""
value=""0"">")
StringFormat.Append(" <param name=""ProfileAddress""
value="""">")
StringFormat.Append(" <param name=""ProfilePort""
value=""0"">")
StringFormat.Append(" <param name=""AllowNetworking""
value=""all"">")
StringFormat.Append(" </object>")
Dim OutPutString As StringBuilder = New StringBuilder()
OutPutString.AppendFormat(StringFormat.ToString, 468, 60,
Me.ImageUrlField, Me.ImageUrlField)
writer.Write(OutPutString.ToString)
Else
MyBase.Render(writer)
End If
End Sub
Protected Overrides Sub OnAdCreated(ByVal e As AdCreatedEventArgs)
MyBase.OnAdCreated(e)
If e.ImageUrl.ToLower().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
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...
1
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...
4
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...
2
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...
3
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...
0
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
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...
0
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 . ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.