Creating Flash Slideshows using XML data is a very popular practice with Flash developers because it's easy to change the images in the show and to also customize many other aspects of the presentation. If you Google ActionScript 3.0 XML slideshow, or something similar, you'll find a number of very interesting tools, articles and tutorials for creating image slideshows that are easy to change and customize. Here's one, Creating a Flash ActionScript 3.0 Slideshow with XML. Here's ActionScript 3.0 XML Slideshow, volume 1.3. Here's a Kirupa article, Photo Slideshow using XML and Flash. You'll find a variety of tools. Some of these tools will have you adding images and getting a nice slideshow up in minutes. Others are more complex and thorough and more involved. This tutorial shows you how to create a simple slideshow using ActionScript 3.0, Flash and XML. As a resource for this tutorial. I used several of the slideshow scripts that I found through a Google search. I'd like to credit the authors. Perhaps the most clearly documented was Rafael Nuenlist here. This article was on the TechLabs website and on the bottom here you can see Rafael's bio and credits. Also Jared, on his website Simplistika.com and a very nice detailed and complex, more complex than the other one, XML script as well as some documentation and a forum here. The kirupa.com site has some of the best Flash and ActionScript articles and tutorials around and their article on creating a Photo Slideshow using XML was no exception. Very, very good presentation and documentation as well as source files. I like to use the examples that include source files. There are many other very good resources available on the web on this topic, so be sure to take some time and check these out, do some Google searches. Let's start our work by checking out the finished scripts in the Work Files folder I've created a subfolder labeled XML Slideshow. Open that up and you'll notice that there are a set of resource files here for you including an XML file labeled images.xml. Go ahead and open that up in a text editor like Notepad or if you have Dreamweaver, Dreamweaver will also open this up for you. Let's have a look at this file in Notepad. Notice how the data in this XML file is structured and tagged. Let's go ahead and start with this XML file. If you want to create your own XML file go ahead and first line here describe the version and the encoding of the file. In this case Flash uses UTF-8 for encoding, so you'll want to edit the file in the UTF-8 format only to avoid character encoding problems. The first Node here, or tag, defines the root Node of the XML file and contains further Nodes. These are images with the attributes src and description so if you want to add more images I think the easiest way to do this is to take my file, copy this image tag, change the source data, change the description data, go ahead and paste it in down below so you can very easily include more images in the slideshow that we'll be creating. Go ahead and swap out your images with mine. The easiest way to do that is just to name your images image1, 2, 3 and 4 or you can put in new images in your images subfolder. Notice that there's the images subfolder there and provide the name here including the extension, don't forget the extension there,. JPG in this case. Now the key here is notice how easy it would be to swap images, add images, change titles and so on. You don't even need to touch the FLA file so even clients could easily go in here and edit this XML file to swap out images, change descriptions, or add images, or subtract images. Back here in the XML Slideshow subfolder, notice that there's another folder inside of it labeled images with a lower case I. All my images are stored here - image1, image2, 3 and 4, all with lower case letters. If you want to swap out your own images here the easiest way is to copy those images to this subfolder then change the names to match mine here. If you want to go with different names you will need to change the image source tag here in your XML file. Let's now move on to the FLA files. Notice that there are two of them in the XML Slideshow folder: slideshow underscore finished and slideshow underscore start. Open both of these up. You'll notice that they're the same except for the finished version has all the scripts here in the first frame of the script layer and the slideshow start is empty, so you'll be working on the slideshow start and adding in all the script as I go through the tutorial. Let's go back and move our ActionScript Pane out of the way and let's review the structure of this Flash file. Up in the top is an Actions Layer, then a Slide Info Layer that contains a movie clip with a TextField that will hold our description down here. Notice that the name of that movie clip is slide underscore label, very, very important that you label that if you're going to be creating your own graphics from scratch. If you want to match the script that I'm giving you make sure that's labeled exactly like this, slide underscore label. Next, we have a Mask Layer that's hidden. If we open that up - also it's locked - if we open that up notice that it's a mask that hides the layer underneath it, the image container, that's another movie clip that will hold the images that I'll be fading in and out. That will be an empty movie clip where the images will be loaded. Feel free to go ahead and change the graphics that you have here. I've just kept the same graphics from Rafael's original Work Files. We're now ready to start adding the scripts that will actually get the slideshow working. You can see the entire script in the slideshow underscore finished file. Click on the first keyframe there in the Script Layer, open up the Actions Panel and you can scroll through the entire script, but for now switch over to the slideshow underscore start file, open up your Actions Panel, click on the first keyframe there in the Actions Layer and then move on to the next movie so I can give you the scripts line by line explaining it as we go.
|Course:||Adobe Flash ActionScript 3.0 for Designers|
|Duration:||9.5 hrs / 101 lessons|
|Captions:||Available on CD and Online University|
WIN XP SP3, OS X 6+, Android 4, iOS 4, Linux
TERMS & CONDITIONS OF USE
BY SUBSCRIBING TO THIS SERVICE, YOU ARE CONSENTING TO BE BOUND BY AND ARE BECOMING A PARTY TO THIS AGREEMENT, THE TERMS AND CONDITIONS OF WHICH SHALL PREVAIL IN GOVERNING YOUR RIGHTS OF USE. BY CLICKING THE "BECOME A MEMBER" BUTTON, THE INDIVIDUAL OR ENTITY LICENSING THE PRODUCT ("YOU") IS CONSENTING TO BE BOUND BY AND IS BECOMING A PARTY TO THIS AGREEMENT. IF LICENSEE DOES NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, THE BUTTON INDICATING "BECOME A MEMBER" MUST NOT BE SELECTED, AND LICENSEE MUST NOT INSTALL OR USE THE SOFTWARE.
"VTC" refers to Virtual Training Company,
"You" refers to the user or subscriber.
"Software" refers to the VTC training content and software.
2. LICENSE: VTC hereby grants to You a worldwide, non-royalty bearing, non-exclusive license to use the Software according to the provisions contained herein and subject to payment of the applicable subscription fees.
3. RESTRICTIONS: You may not do any of the following:
Save the Software to Your hard disk or other storage
medium; permit others to use the Software except as specified by addendum;
modify, reverse engineer, decompile, or disassemble the Software; make
derivative works based on the Software; publish or otherwise disseminate
the Software. VTC, Inc., VTC Online University, and the Virtual Training
Company site is owned and operated by VTC, Inc. as a corporation of
All materials on this site are the property of VTC unless otherwise specified. No material from these pages may be copied, reproduced, republished, downloaded, uploaded, posted, transmitted, or distributed in any way. Modification of the materials or use of the materials for any other purpose is a violation of U.S. copyright law and other proprietary rights. For purposes of this Agreement, the use of any such material on any other web site or networked computer environment is prohibited.
4. FEES: The rights granted under this Agreement
are effective only upon payment of the subscription fees, which are
strictly non-refundable other than as expressly provided herein. The
term "monthly subscription" is defined as any 30 day period.
The term "yearly subscription" is defined as one 365 day
period. A yearly subscription ends on the same numerical date as it
began (example July 28, 2004 to July 28, 2005).
The VTC Online University is access to every VTC training tutorial in our library. You pay a flat fee for access to these titles. You are billed according to your renewal selection below, and can renew monthly, yearly, or in any other increment offered. If you choose to be billed monthly, you will be billed every 30 days for the subscription until you request the subscription be cancelled. Our terms of service state that you must cancel a monthly subscription at least two business days before your renewal date. These two days give us enough time to ensure that you will not be charged again.
5. LIMITED WARRANTY: VTC warrants that the Software, if operated as directed, will substantially achieve the functionality described. VTC does not warrant, however, that Your use of the Software will be uninterrupted or that the operation of the Software will be error-free or secure. In addition, the security mechanisms implemented by the Software have inherent limitations, and You must determine that the Software sufficiently meets Your requirements. VTC also warrants that the media containing the Software, if provided by VTC, is free from defects in material from the date You acquired the Software. VTC's sole liability for any breach of this warranty shall be, in VTC's sole discretion: (i) to replace Your defective media or Software; or (ii) to advise You how to achieve substantially the same functionality with the Software as described; or (iii) if the above remedies are impracticable, to refund the subscription fee You paid for the Software. Only if You inform VTC of Your problem with the Software during the applicable subscription period will VTC be obligated to honor this warranty. VTC will use reasonable commercial efforts to repair, replace, advise, or refund pursuant to the foregoing warranty within thirty (30) days of being so notified. If any modifications are made to the Software by You during the warranty period; if the medium is subjected to accident, abuse, or improper use; or if You violate the terms of this Agreement, then this warranty shall immediately terminate. This warranty shall not apply if the Software is used on or in conjunction with hardware or software other than the unmodified version of hardware and software with which the Software was designed to be used as described.
THIS IS A LIMITED WARRANTY, AND IT IS THE ONLY WARRANTY MADE BY VTC OR ITS SUPPLIERS. VTC MAKES NO OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTIES' RIGHTS. YOU MAY HAVE OTHER STATUTORY RIGHTS. HOWEVER, TO THE FULL EXTENT PERMITTED BY LAW, THE DURATION OF STATUTORILY REQUIRED WARRANTIES, IF ANY, SHALL BE LIMITED TO THE ABOVE LIMITED WARRANTY PERIOD. MOREOVER, IN NO EVENT WILL WARRANTIES PROVIDED BY LAW, IF ANY, APPLY UNLESS THEY ARE REQUIRED TO APPLY BY STATUTE NOTWITHSTANDING THEIR EXCLUSION BY CONTRACT. NO DEALER, AGENT, OR EMPLOYEE OF VTC IS AUTHORIZED TO MAKE ANY MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS LIMITED WARRANTY.
6. PROPRIETARY RIGHTS: VTC reserves all proprietary rights in and to the Software, is protected by copyright and other intellectual property laws and by international treaties. VTC, Inc.
Trademark Notice: VTC, Virtual Training Company,
Inc., The VTC Logo, and VTC Online University, are trademarks of VTC,
Inc. All other company and product names may be trademarks of their
The information contained herein is subject to change without notice. Copyright © 1995 - 2005 VTC, Inc. All rights reserved.
7. TERMINATION: This Agreement shall automatically terminate if You fail to comply with the restrictions described herein. Your obligations to pay outstanding subscription fees shall survive any termination of this Agreement.
8. LIMITATION OF LIABILITY: UNDER NO CIRCUMSTANCES
AND UNDER NO LEGAL THEORY, TORT, CONTRACT, OR OTHERWISE, SHALL VTC
OR ITS SUPPLIERS OR RESELLERS BE LIABLE TO YOU OR ANY OTHER PERSON
FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
ANY CHARACTER, INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
COMMERCIAL DAMAGES OR LOSSES. IN NO EVENT WILL VTC BE LIABLE FOR ANY
DAMAGES IN EXCESS OF THE AMOUNT VTC RECEIVED FROM YOU FOR A LICENSE
TO THE SOFTWARE, EVEN IF VTC SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM VTC'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
9. Links To Other Materials: Linked sites found at the VTC site are not under the control of VTC, and we are not responsible for the content of any linked site or any link contained in a linked site. VTC may change links based solely on our discretion, and we reserve the right to terminate any link or linking program at any time. VTC does not, by linking to sites, endorse companies or products to which it links and reserves the right to note as such on its web pages. If you decide to access any of the third party sites linked to this site, you do this entirely at your own risk.
Forums, and Chat are not always screened by VTC, and we are not responsible for the content of any public or open forum content at the site. VTC may change these public forums based solely on our discretion, and we reserve the right to terminate any forum at any time. VTC does not, by allowing these forums, endorse companies or products which may be mentioned in these forums, and reserves the right to note as such on its web pages. If you decide to access any of the public forums in this site, or linked to this site, you do this entirely at your own risk.
9. GOVERNING LAW & DISPUTE RESOLUTION: This Agreement is governed by Virginia law. All disputes between You and VTC shall be finally resolved through arbitration in Winchester, Virginia. This site is controlled by VTC from its offices within the United States of America. VTC makes no representation that materials in the site are appropriate or available for use in other locations, and access to them from territories where their content is illegal is prohibited. Those who choose to access this site from other locations do so on their own initiative and are responsible for compliance with applicable local laws. You may not use or export the Materials in violation of U.S. export laws and regulations. Any claim relating to the Materials shall be governed by the internal substantive laws of the Commonwealth of Virginia, USA.
VTC may revise these Terms at any time by updating this posting. You should visit this page from time to time to review the then-current Terms because they are binding on you. Certain provisions of these Terms may be superseded by expressly designated legal notices or terms located on particular pages at this Site.
If you have any questions regarding this policy,
or your information specifically,
you may email us at:email@example.com.