Open Source Thought

Free Flash XML Banner Rotator

Free Flash XML Banner Rotator

Jun 25, 2008

So everyone needs an XML Banner in Actionscript 2 and honestly I am kind of tired of making them over and over again. I would rather work on something big and beautiful. You can use this for whatever you want. It reads off of an XML where you can set it to show them in random order, set the time the banners have to show and other such features.

View Demo

Here is a sample of the xml and an explaination of each node.

<rotator isRandom=”false”> – Set to true for random order of banners
<bannerTime>2</bannerTime> – Number of seconds to show each banner
<numberOfBanners>5</numberOfBanners> – Number of banners
<banners showHeader=”true”> – Shows the title
<banner>
<name>Banner 1</name> – Caption that shows on the bottom
<body>Lorem Ipsum</body> – For extra functionality if necessary
<imagePath>01.jpg</imagePath> – Path of the image
<link>http://www.weberdesignlabs.com</link> – Link the banner goes to
</banner>
</banners>
</rotator>

Download Flash XML Banner Rotator Version V1

Enjoy!

[ad#co-1]

  • Maria
    where can i find instructions on how to install this? for someone who has never done xml before?
  • There is no instructions on installing this. It runs as is and you just have to edit the XML and maybe the path in the Flash. XML and HTML are very similar so if you have any website coding skills you should be just fine. Otherwise you might consider hiring someone to help you out.
  • Westcoastenergy
    Gotta say! Sure wish I stuck to the forum when i downloaded the file, all the answers are in here if you look. I saw a lot of re-posts that weren't necessary but regardless. Great Job Man!!! Easy to tweak and it works like a hot damn! Love it!

    CheerS!
  • Me
    when published, the images don't show, just the name of the images even though everything has been uploaded
  • Check your paths in the XML then. If you are using relative paths, then change to absolute and if that fixes it then your relative paths were wrong. Also if the images are loading from another site, check for your crossdomain issues.
  • Can't seem to get this to work importing the .swf into a Flash Catalyst project. The First banner shows up great, but then fads and doesn't go on to the next banner. Any help would be great!

    -Hal
  • Ozzy
    Download my free image/banner rotator - http://github.com/OzzyCzech/omBanner

    http://www.nabito.net/adobe-flash-image-rotator... - here is blogpost in czech language about my banner rotator flash opensource app
  • Soundfree
    How can I change transition effect color to white. I try but it is alwaus black transition background
  • v55
    Great banner rotation but would like to edit it so it doesn't fade to black, but just fades over the previous image- am an Actionscript novice- can anyone suggest where I can modify the code? Thanks in advance, Veronica
  • vadivel
    why did use this tags

    <bannerTime>2</bannerTime>
    <numberOfBanners>5</numberOfBanners>

    only i need

    <banners showHeader=”true”> – Shows the title
    <banner>
    <name>Banner 1</name> – Caption that shows on the bottom
    <body>Lorem Ipsum</body> – For extra functionality if necessary
    <imagePath>01.jpg</imagePath> – Path of the image
    <link>http://www.weberdesignlabs.com</link> – Link the banner goes to
    </banner>
    </banners>

    how does write the code in flash,plz give me any sample or simple code
  • Sage
    Beautiful! You're a genius. Just what I needed.
  • Matt
    Great banner, all working great just getting stumped by trying to find where the call to the XML document is. Cant seem to find it anyway within the HTML, JS or FLA file. I want to have 2 banners running on the same page so need to calls to 2 different XML files. Any help much appreciated.
  • Very nice banner once you figure out how to work it. I've been using it for quite some time now on my website: http://lostvalley-photography.com/
  • Gustav
    I have the following dimensions: 762x405 and the banner doesn't allow it... For some reason is maximizing the picture. Is not showing the entire image.
  • If you want to change the size of the image, then you have to change the Flash.
  • sorted
    Just to say thanks very much for this, gotta love the internets
  • mountainmanent
    Where is the instruction and setup file? Script pretty straight forward except I don't seem to be able to reference the XML file. JS doesn't not seem to reference an VARxml....attribute to call the XML script.
  • help with xml files
    can someone please tell me how/where to set the directory paths?
    really would like to get this working...!

    i set the path in the html file for the .js and now i have a black (#000000) space showing.

    im totally new to this; can someone give me 'noob' 'instructions?

    i have put all the files in same directory 'XML' but i have no idea how to set the directory paths; i am only running a local server at this point in time; so it's all http://localhost/ etc...

    i can get a "normal" .swf to run, but these referenced xml files i have no idea..please help!!
  • Nick W.
    Beast! Thanks so much for this. Putting it on a site right now.
  • Adam
    Ive uploaded the files ( swf pics and js ) to a site that is not the hosting site of the page where the code is. I changed the "allowscriptaccess" value to "always" but the content still does not load. Ive changed the parameters to the full URL where the files are. is there something with the class that needs to be changed?
  • Thank you wonderful!

    I am want to too long time.. Perfect time!
  • Ken
    thanks for the great flash rotator! I've just one issue. I'm trying to display banners that are 846w by 258h, for some reason I'm getting a large black space on the right side of the banner and it's cutting off about 30% of the banner itself. any ideas?

    my settings:

    'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
    'width', '846',
    'height', '258',
    'src', 'XML_Banner',
    'quality', 'high',
    'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
    'align', 'TL',
    'play', 'true',
    'loop', 'true',
    'scale', 'noscale',
    'wmode', 'opaque',
    'devicefont', 'false',
    'id', 'XML_Banner',
    'bgcolor', '#000000',
    'name', 'XML_Banner',
    'menu', 'false',
    'allowFullScreen', 'false',
    'allowScriptAccess','sameDomain',
    'movie', 'XML_Banner',
    'salign', 'left'

    any help would be great!
    thanks again!
  • Vahur
    Hello,

    Could you please tell me where could i change the flash size so that it works. I opened the *.fla file and changed the size and imported the movie but it would not work, there is a black box in the right corner. I would like to change the size to 700x240, i allready changed the pictures to that size.

    Thank you in advance,
    Vahur
  • vinothsn
    can you send flash 8 version in file
  • Sibel
    very good! thanks...
  • jgionet
    I still can't figure out how to resize the banner dimensions!
    I have CS4 Pro! Help Please!
    Tried following the instructions in these comments and I can't find the exact settings mentioned. I'm fairly new to using Flash.
    Thanks
  • ms.webtech
    this.onResize = function()
    {
    //-- Called when browser is resized.

    this.txtDimentions._x = (Stage.width / 2) - (this.txtDimentions._width / 2);
    this.txtDimentions._y = (Stage.height / 2) - (this.txtDimentions._height / 2);
    this.txtDimentions.text = Stage.width + "x" + Stage.height;
    };

    Stage.scaleMode = "noScale";
    Stage.align = "TL";
    Stage.showMenu = false;
    Stage.addListener(this);

    this.onResize();

    may be this can help u
  • Manish
    sounds good!

    I want to make a flash header just like
    http://www.hulu.com/
    Can you help me on that ?
  • The code you are seeing does not currently do what you are talking about, however with some modification that could be accomplished. If you are not familiar with Actionscript I would suggest hiring a freelance developer to help you out.
  • wzcocoon
    small problem I am trying to includ this into the template of my site but been a dynamique template it look like the banners.xml file is not found so where and how can I put the full path to the xml file?

    templates/<?php echo $this->template ?>/XML_Banner
  • Wolverene
    Awesome! I see that there are buttons in the library but they don't appear on the display. How can it be made to appear there. It is useful for a user to play stop pause and go back and forth. thanks.
  • cbonline
    Hi!
    This banner is very nice. I need a width of 700 px. How could i change this. I have always a free space on the right side. Please help me? I go crazy.

    Thank you.
  • tati2001
    how to make it appear on your page? I mean we need the code to replace the link where lead the xml file and swf file. I need that code. Could you please give it to me? Thanks
    my email: ezz_tarek@hotmail.com
  • cat dang
    But how to make it appear on your page? I mean we need the code to replace the link where lead the xml file and swf file. I need that code. Could you please give it to me? Thanks
    my email: meocondautron@yahoo.com
  • Thanks for the great Banner Rotator. I've got it all set up and ready to go EXCEPT that for some reason it is displaying slightly wider than I want it.

    http://ozarkconference.org/banner/XML_Banner.html

    Needs to be 660 wide by 191 high.

    I'm Flash ignorant. Looks like the .swf file has the wrong dimensions.

    Any suggestions?
  • spreken
    its better if you put a button stop , play, next and preview....
    well its nice
  • stripetg
    Love this XML_Banner! It works great. One tweak I was wondering about doing is have the banners fade over the next image in the series, instead of to black or white.
  • lurko
    This stuff is awesome!
    I am not a flash guru, but I have managed to modify the swf as I wanted.
    Regarding the utf8 fonts, you need to embed the font sets you want: edit the movieclip named header_text, select the 'headerTxt' input area and click the embed button on the properties panel. Now choose whatever you need.

    Displaying body text: make a new input text component on the movieclip named header_text, and set the type to 'Dynamic Text' on properties panel. Name this item 'bodyTxt'.
    Now go back and edit banner_mc movieclip, frame 2, on the layer named 'actions'. Open up the actions panel (or press F9) and add this line right after line 14:
    imageText_mc.bodyTxt.text = bodyTexts[imageCounter].toString();

    (line 14 is like this:imageText_mc.headerTxt.text = banners[imageCounter].toString();)

    Hope this helps.

    Thanks for the great stuff again.
  • Name
    Hello again, any suggestions regarding my sizing-problem (is that how you would call it - I´m not native...)

    Just a small note if reducing the size without making the photo smaller would be great - or a quick not if it´s not possible..

    Thanks and greetings from Munich..
    The clueless female behind the screen
  • Name
    I cannot open up the fla file, i am using Micromedia Flash V8. When i tried to open it it says Unexpected File format.

    All i am trying to do is make it so the body text is displayed. How do you open the FLA?
blog comments powered by Disqus