NO FLASH
QUOTE
images_xml = new XML();
images_xml.onLoad = startImageViewer;
images_xml.load("xml/images.xml");
images_xml.ignoreWhite = true;
//
// Show the first image and intialize variables
function startImageViewer(success) {
if (success == true) {
rootNode = images_xml.firstChild;
// 'totalImages' is the variable name set to correspond with the the dynamic text instance of 'totalImages'
totalImages = rootNode.childNodes.length;
// [ totalImages = rootNode.childNodes.length; ] gets the total number of childNodes (total number of image and text files) in your .xml document
firstImageNode = rootNode.firstChild;
currentImageNode = firstImageNode;
// 'currentIndex' is the variable name set to correspond with the dynamic text instance of 'currentIndex'
currentIndex = 1;
// [ currentIndex = 1; ] sets the viewer to play the first childNode (first image and text file) in your .xml document
updateImage(firstImageNode);
}
}
//
// Updates the current image with new image and text
function updateImage(newImageNode) {
// 'imagePath' is the variable name set to correspond with the .jpeg file name located in your .xml document
imagePath = newImageNode.attributes.jpegURL;
// 'imageText' is the variable name for the instance 'textArea'
imageText = newImageNode.firstChild.nodeValue;
// 'targetClip' is the instance name for the movie clip 'imageArea', this is where all your image files from your .xml document are loaded
targetClip.loadMovie(imagePath);
// IMPORTANT : RESCALING THE SIZE OF THE 'imageArea' MOVIE CLIP WILL AFFECT THE ORIGNAL SIZE OF WHATEVER IMAGE YOU HAVE IN YOUR IMAGES FOLDER
}
//
/* Event handlers for 'Next image' and 'Previous image' buttons.
These statements allows flash to advance or go back to the next childNode
(next image and text) in your .xml document.
The Property (.nextSibling;) evaluates the XML object and references the next sibling
in the parent node's child list. This method returns null if the node does not
have a next sibling node. This is a read-only property and cannot be used to
manipulate child nodes.
*/
next_btn.onRelease = function() {
nextImageNode = currentImageNode.nextSibling;
if (nextImageNode == null) {
break;
} else {
currentIndex++;
updateImage(nextImageNode);
currentImageNode = nextImageNode;
}
};
//
// Event handler for 'Previous image' button
back_btn.onRelease = function() {
previousImageNode = currentImageNode.previousSibling;
if (previousImageNode == null) {
break;
} else {
currentIndex--;
currentImageNode = previousImageNode;
updateImage(previousImageNode);
}
};
images_xml.onLoad = startImageViewer;
images_xml.load("xml/images.xml");
images_xml.ignoreWhite = true;
//
// Show the first image and intialize variables
function startImageViewer(success) {
if (success == true) {
rootNode = images_xml.firstChild;
// 'totalImages' is the variable name set to correspond with the the dynamic text instance of 'totalImages'
totalImages = rootNode.childNodes.length;
// [ totalImages = rootNode.childNodes.length; ] gets the total number of childNodes (total number of image and text files) in your .xml document
firstImageNode = rootNode.firstChild;
currentImageNode = firstImageNode;
// 'currentIndex' is the variable name set to correspond with the dynamic text instance of 'currentIndex'
currentIndex = 1;
// [ currentIndex = 1; ] sets the viewer to play the first childNode (first image and text file) in your .xml document
updateImage(firstImageNode);
}
}
//
// Updates the current image with new image and text
function updateImage(newImageNode) {
// 'imagePath' is the variable name set to correspond with the .jpeg file name located in your .xml document
imagePath = newImageNode.attributes.jpegURL;
// 'imageText' is the variable name for the instance 'textArea'
imageText = newImageNode.firstChild.nodeValue;
// 'targetClip' is the instance name for the movie clip 'imageArea', this is where all your image files from your .xml document are loaded
targetClip.loadMovie(imagePath);
// IMPORTANT : RESCALING THE SIZE OF THE 'imageArea' MOVIE CLIP WILL AFFECT THE ORIGNAL SIZE OF WHATEVER IMAGE YOU HAVE IN YOUR IMAGES FOLDER
}
//
/* Event handlers for 'Next image' and 'Previous image' buttons.
These statements allows flash to advance or go back to the next childNode
(next image and text) in your .xml document.
The Property (.nextSibling;) evaluates the XML object and references the next sibling
in the parent node's child list. This method returns null if the node does not
have a next sibling node. This is a read-only property and cannot be used to
manipulate child nodes.
*/
next_btn.onRelease = function() {
nextImageNode = currentImageNode.nextSibling;
if (nextImageNode == null) {
break;
} else {
currentIndex++;
updateImage(nextImageNode);
currentImageNode = nextImageNode;
}
};
//
// Event handler for 'Previous image' button
back_btn.onRelease = function() {
previousImageNode = currentImageNode.previousSibling;
if (previousImageNode == null) {
break;
} else {
currentIndex--;
currentImageNode = previousImageNode;
updateImage(previousImageNode);
}
};
NO XML
QUOTE
<IMAGES>
<imageNode jpegURL="images/image1.jpg">Rapidly develop rich Internet applications with approachable, integrated tools that leverage leading web server technologies and device platforms.</imageNode>
<imageNode jpegURL="images/image2.jpg">Dreamweaver MX
Build websites and web applications.</imageNode>
<imageNode jpegURL="images/image3.jpg" link="images/image1.jpg">Macromedia Flash MX
Create rich Internet content and applications.</imageNode>
<imageNode jpegURL="images/image4.jpg">ColdFusion MX
Rapidly build and deploy Internet applications.</imageNode>
<imageNode jpegURL="images/image5.jpg">Fireworks MX
Design and optimize interactive web graphics.</imageNode>
<imageNode jpegURL="images/image6.jpg">FreeHand 10
Create vector-based illustrations for Macromedia Flash and for print.</imageNode>
<imageNode jpegURL="images/image7.jpg">Director 8.5 Shockwave Studio
Develop magnetic Internet destinations and powerful multimedia.</imageNode>
<imageNode jpegURL="images/image8.jpg">JRun 4
The fast, affordable, and reliable J2EE server.</imageNode>
<imageNode jpegURL="images/image9.jpg">Authorware 6.5
Create rich-media e-learning applications with a drag-and-drop visual interface.</imageNode>
</IMAGES>
<imageNode jpegURL="images/image1.jpg">Rapidly develop rich Internet applications with approachable, integrated tools that leverage leading web server technologies and device platforms.</imageNode>
<imageNode jpegURL="images/image2.jpg">Dreamweaver MX
Build websites and web applications.</imageNode>
<imageNode jpegURL="images/image3.jpg" link="images/image1.jpg">Macromedia Flash MX
Create rich Internet content and applications.</imageNode>
<imageNode jpegURL="images/image4.jpg">ColdFusion MX
Rapidly build and deploy Internet applications.</imageNode>
<imageNode jpegURL="images/image5.jpg">Fireworks MX
Design and optimize interactive web graphics.</imageNode>
<imageNode jpegURL="images/image6.jpg">FreeHand 10
Create vector-based illustrations for Macromedia Flash and for print.</imageNode>
<imageNode jpegURL="images/image7.jpg">Director 8.5 Shockwave Studio
Develop magnetic Internet destinations and powerful multimedia.</imageNode>
<imageNode jpegURL="images/image8.jpg">JRun 4
The fast, affordable, and reliable J2EE server.</imageNode>
<imageNode jpegURL="images/image9.jpg">Authorware 6.5
Create rich-media e-learning applications with a drag-and-drop visual interface.</imageNode>
</IMAGES>
quem puder ajudar agradeço!

Help














