Free FlashDen file of the month. Click here to download.
Search  

EASY XML BACKGROUND IMAGE ROTATOR

HomeBrowse CategoriesUtilitiesBackgroundsEasy XML Background Image Rotator

Easy XML Background Image Rotator

This file was created as an easy way to have full background images in your flash file. By placing this in your project and editing an extremely simple XML file you can have images that automatically center, and fill to fit your stage. You can put in one image and use it as an easy way to add a nice auto-resizing background, or you can point the xml at multiple images and have it loop through them at an interval you specify in the xml file.

Features:

  • Automatically centers all images, and optionally scales them to fit to your stage as best as they can.

  • Can take one image, and statically show it, or many and loop through them.

  • What images to use, whether each scales to fit, and the loop interval time is all XML driven.

  • Has features built in so that if it is to change images and the next one isn’t ready, it will wait until it is, immediately switch to it, and then restart the timer, so it always plays cleanly and smoothly.

  • You can drag and drop a movie clip onto your stage to place it, or use it as a class in script.

  • About 2k added to your file size.

  • You can place it in any amount movie clips nested within each other and it will still place and scale correctly. It’s smart like that :)

  • For expert coders that wish to integrate more deeply, it dispatches an event once the first image is done loading, for loading purposes so that your site can sync with the background being ready.

  • Images load one at a time, so that you can see them in order, quicker. But they also start loading the next one immediately after the previous is loaded, so that loading is done as quickly as possible, reducing possible slow downs.

Website Templates:

Image and Mixed Media Galleries:

MP3 Players:

Updating and Upkeep Tools:

Website Parts and Components:

Menus and Preloaders:

keywords: flash, vector, loader, preloader, pre-loader, actionscript, action script, as3, actionscript 3.0, animation, simple, clean, loading, images, image, photo, photos, background, backgrounds, gallery, rotator, slideshow, show, xml, easy

Posted 7 months ago

ITEM DISCUSSION

Show Comments By

Very good. I like it a lot.

Posted 7 months ago

Smooth and clean transition :).

Posted 7 months ago

Superb concept and realization, looks really useful.

Posted 7 months ago

Thank you very much guys! It may not be one of the most flashy files on this site, but it’s intention was to be a useful thing for either a developer or a newbie :) And I think it does that well!

Posted 7 months ago

Hi MBMedia! Very nice file! i’ll love it! But i’ve 1 question… well i’m beginning in as3 and when i publish the file in browser (firefox) the background doesn’t fill the entire page! (not as the exemple shown here) there still are borders in it! Do i forgot something to do?in publish setings? First i put “percent” for “dimensions” to able center and resize the images but for those borders i don’t know… Please could u help me? Thanks a lot!

Posted 7 months ago

Hi MBMedia! My bad i think i found it! it was just editing HTML file putting all margins to “0” ! lol Still a great file!!!!! :)

Posted 7 months ago

Yes, all HTML pages put a margin, it has nothing to do with Flash, simply use a little CSS in your HTML page to remove that.

Posted 7 months ago

Hi MB, I bought this as an improvement on part of my own solutuion for a fully browser-size-sensitive CSS /ASP site. It’s excellent and is working great on my home page, where I have put the supporting files into the root.

Trouble is my site is dynamic. I’ve created an swf file for each ‘page’ each with an accompanying xml file in it’s own directory, and the swf is dynamically called – but of course the trouble is I’m using only one page, and so i cannot have the swf call the individual ‘local’ files.

Is there a way I can alter each individual swf to link to the ‘local’ folder when it’s not local, but is instead… 5 directories further down the root?

I’ve altered the AS XML string path, but how can I do the same for the XMLBackground.as? I’ve a liitle AS2 knowledge, but AS3 …! Thanks.

Posted 7 months ago

the local folder holds the Actionscript for the project. It does not run like javascript does in HTML , it does not pull it in when it runs, Actionscript is pulled in to flash and compiled when you publish the file, not when it runs. You can even delete the local folder up on your server, it doesn’t use it, only the sources use it when you publish.

If you want 5 different versions of this file that have different Actionscript, you need to publish 5 different swfs, this is how Flash works (AS2 and AS3 ) not just my file :)

Posted 7 months ago

I have a problem with plug-in the background to other template, it is not working. Can you help me

Posted 6 months ago

possibly, but you’re going to have to give me a lot more info than that, email me with the particulars of what is happening :)

Posted 6 months ago

Wow, I really love the full screen background. But one question, I was wondering if it is possible to make that background script a gallery type thing. So for instance, If I have a really cool scroller or thumbnails, when a thumbnail is clicked, can the actionscript that is put on the button or movie(thumbnail) pull up specific background image? So its pretty much a gallery function, click a thumb or button, and the thumbnail syncs with the correct background image?

Posted 6 months ago

If you are an intermediate programmer with AS3 that would be rather easy to do, there are functions for showing the images. Other than that I have galleries in my portfolio

Posted 6 months ago

dude what got to do to put this file into de index.html cuz i put the swf file into the html but when i go to my web this no appears at the entire web size, i need help , dont speak english very well

Posted 5 months ago

dude what got to do to put this file into de index.html cuz i put the swf file into the html but when i go to my web this no appears at the entire web size, i need help , dont speak english very well

Posted 5 months ago

Not 100% sure what you’re asking. If you’re just trying to embed then google embedding a swf in html

If you are talking about there being margins on the edge of the page try adding this CSS to eliminate margins:

body {margin:0;} Posted 5 months ago

ok, even though it was in code tags it still smilied it…. look at it here:

http://pastie.org/359313

Posted 5 months ago

Thats what I was looking for exactly thanks

Posted 3 months ago

Hey

is there easy to build in option to load other xml feeds on a other key frame in the site.

because every frame a other bg xml feed

and the feed is only reading in the first 4 xml images

images/bg/Theresia/DSC01619.png images/bg/Theresia/DSC01624.png images/bg/Theresia/DSC01669.png images/bg/Theresia/DSC01677.png images/bg/Theresia/DSC01703.png images/bg/Theresia/DSC01706.png Posted 3 months ago

There is no option for that, if you email me I can point you to a good freelancer though :)

Posted 3 months ago

hi,

can you at least provide a working html file? eight out the box, the zip doesn’t containt any html to see your work (if is working nicely).

regards.

Posted about 1 month ago

hi again,

could be great to output the flash to fullscreen too… not only fullscreen of the available browser screen… is it possible?

Posted about 1 month ago

@ fakokay

Just embed in HTML however you normally would embed, even just hit publish from flash if you want. If you want it full browser, then just change the embed width and height in the published file to 100% by 100% and add style=”margin: 0px;” to the body tag. If you run into any problems or have any specific questions about the process than feel free to post them here and I’ll do my best to answer them ;)

As for the fullscreen button that is just not what this component is. There are other components on this site that are for that. And as long as they are correctly functioning items (and for AS3 ) there is no reason a site couldn’t use both :)

Posted about 1 month ago

hi, i’d like to add few more swf files to this file. would you be interested in simple customization? please let me know.

Posted about 1 month ago

Hi

Can anyone help me with adding a preloader to this file?

Thanks, Zee

Posted 26 days ago

Hi

I have dowloaded your’ xml easy background rotator’ and I understand that you are busy but can you please please explain to me how to add a movieclip to the ‘main.fla’ and keep it centered to the screen. I can place the movieclip or load it as an external swf but i just can figure out how to always have that movieclip centered to the browser.

I’ve tried creating a new layer on top and adding the following code but it doesn’t work at all:

var mySprite:Sprite = new Sprite(); mySprite.x = Stage.width / 2; mySprite.y = Stage.height / 2; this.addChild(mySprite);

Thanks in advance.

Much appreciated.

Zee

Posted 25 days ago

@ zunaid

q1) the object dispatches an Event.COMPLETE event once it is ready to display the first image, so you can know when it’s ready for example if it’s instance name was bgImages you could put this:

bgImages.addEventListener(Event.COMPLETE, bgReady);

function bgReady(event: Event) : void
{
    // this will call when the rotator is ready
}

q2) This really has nothing to do with the image rotator, so in the future try to keep general flash questions to the forums where the answers will help the general public, but for learning purposes I might as well tell you what’s wrong with that code :) First off it looks like AS2 code (except for the Sprite part), in AS3 you use stage.stageWidth and stage.stageHeight not Stage.width and Stage.height, and second it will only start centered because you don’t have any listener on the stage for an Event.RESIZE to keep it centered any time the page resizes. There are AS3 files on this site that teach these things better than my short explanation, I don’t have any for sale though :)

Posted 25 days ago

Hi,

is it possible too place the folder / files out of the root?

How can i use this? -> the constructor has 1 optional argument that can be used to override the path to the xml file

Thanks!

Posted about 15 hours ago