Actionscript 3 - Written by Artluvr on Wednesday, March 11, 2009 9:05 - 9 Comments

XML Based Fullscreen Image Rotator With Proportional Resize – Flash CS3 – Actionscript 3

xml_based_background_image_rotator

VIEW DEMO

The last two years we see developers using beautiful images for website backgrounds. In Flash sites we can have functionality and interactivity with the background. So what we created a simple background image rotation component for your website. It takes two line to initialize it and a simple XML if you wish to change the images.

You can customize the following:

  • Transition interval between images
  • Image list
  • Proportional resize

Initializing the component

Copy the RotatingBackground movieclip to the library of your .fla file.

Copy the RotatingBackground.as and images.xml files to the same folder that you have your .fla file.

Write the following two lines of code:

var rb:RotatingBackground = new RotatingBackground(“images.xml”, 12);
addChild(rb);

The first parameter is the name of the xml file and the second the transition interval between the images

XML Structure

<?xml version=”1.0″ encoding=”utf-8″?>
<images>
<image file=”images/1.jpg” />
<image file=”images/2.jpg” />
<image file=”images/3.jpg” />
</images>

Requirements

Tweener for AS3 (included in the zip file)

Price: € 6



Share and Enjoy:

9 Comments

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Derek
Mar 28, 2009 18:47

Hi, is there a simple way with your script to play a certain image in the xml list, rather than having a slide show?

Artluvr
Mar 30, 2009 11:44

@Derek, no unfortunately it can’t

snips
Apr 8, 2009 21:08

i just purchase this. How would I unload this using a button? or is it possible to have 2 versions of this on the same sight so lets say I have a button that loads one set of images and then another button that loads another. New to as3

Artluvr
Apr 18, 2009 14:31

@snips, call the parent’s function removeChild() and pass the object as a parameter. It should look somehting like this (if you added it on the stage)
stage.removeChild(imagerotatorobject);

John
Apr 23, 2009 21:29

Can I change the path to imgaes.xml in runtime?

Bjørn
Jun 13, 2009 10:17

Hi,

I´ve just bought your XML Based Fullscreen Image Rotator With Proportional Resize in order to use it as a background for a website.

Now I would like to place some movieclips on top of the rotating background but every movieclip that I place on top of the background fades out when the first background picture fades out.

Can you tell me what I am doing wrong?

Regards
Bjørn

fagan Wilcox
Sep 19, 2009 2:16

this looks good. But it would have been nice to be able to target a certain image because one of the obvious uses for this would be someones portfolio.

Artluvr
Feb 6, 2010 9:37

@ John, I am afraid not

Artluvr
Feb 6, 2010 9:39

@Bjorn, try putting the background inside a movieclip on a layer at the bottom, and then load your new movieclips inside a movieclip on a top layer.

Leave a Reply

Comment

Most Popular Content






Image Galleries


Menus & Buttons


Utilities


Freebies