Positioning XML slideshow images on Stage

Hello!
I have a xml slideshow that is working fine. The problem I am having is all of the images load in at x=0 and y=0. I would like to have the images load at a specific x coodinate and y coordinate on the stage. I have been looking at other code examples to see how to fit this in to mine but I keep breaking it. IF it's not too much trouble could someone help me out with the code or point me to an example that would help place it in the correct place?
Thanks! Sandra
Here is my code:
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
var transition_time:Number = 3;
var displaying_time:Number = 5;
var timer_tween:Tween;
var alpha_tween:Tween;
var index:int = 0;
var is_picture_loaded:Boolean;
var is_next_transition_ready:Boolean = true;
var picture_holder:Sprite = new Sprite();
addChild(picture_holder);
var xml_data:XML;
var array_of_picture:Array = new Array();
var request_xml:URLRequest = new URLRequest("setup_sss.xml");
var loader:URLLoader = new URLLoader();
var request_picture:URLRequest;
var picture_loader:Loader;
loader.addEventListener(Event.COMPLETE, completeHandler);
function completeHandler(e:Event):void{
    xml_data = new XML(loader.data);
    for(var i:int = 0; i<xml_data.children().length(); i++){
        array_of_picture.push(xml_data.child(i));
        request_xml = null;
        loader = null;
        start_slide_show();
loader.load(request_xml);
function start_slide_show():void{   
    if(index == array_of_picture.length){index = 0;}
    request_picture = new URLRequest(array_of_picture[index]);
    picture_loader = new Loader();
    picture_loader.contentLoaderInfo.addEventListener(Event.INIT, loader_Handler);
    picture_loader.load(request_picture);   
    index++;
function loader_Handler(e:Event):void{
    e.target.content.visible = false;
    picture_holder.addChild(e.target.content);
    is_picture_loaded = true;
    if(is_next_transition_ready){
        var last_child:int = picture_holder.numChildren-1;
        start_transition(picture_holder.getChildAt(last_child));
function start_transition(target:DisplayObject):void{
    is_next_transition_ready = false;
    is_picture_loaded = false;
    target.visible = true;
    target.alpha = 0;
    start_slide_show();
    alpha_tween = new Tween(target, "alpha", null, 0, 1, transition_time, true)
    alpha_tween.addEventListener(TweenEvent.MOTION_FINISH, start_timer);
function start_timer(e:TweenEvent):void{   
    var count:Number = 0;
    timer_tween = new Tween(this, "count", null, 0, 1, displaying_time, true)
    timer_tween.addEventListener(TweenEvent.MOTION_FINISH, remove_picture);
function remove_picture(e:TweenEvent):void{   
    if(picture_holder.numChildren>2){picture_holder.removeChildAt(0)}   
    timer_tween.removeEventListener(TweenEvent.MOTION_FINISH, remove_picture);
    is_next_transition_ready = true;
        if(is_picture_loaded){           
        var last_child:int = picture_holder.numChildren-1;       
        start_transition(picture_holder.getChildAt(last_child))

I new I had to move it but I couldn't find out a sample of how to write it, but I figured it out!! So that is now working... BUt now I have another problem which doesn't make any sense at all. When I test my movie locally everything works fine all of my movies pull in correctly in the correct place But when I upload them on the server some of the movies don't show up... specifically some of the ones I worked on this afternoon. My html pages I update load but anything swf doesn't seem to.
I have taken the whole folder and moved it somewhere else and again checked it locally and worked but uploaded not there!! I check on the server files appear to be there. I am posting this xml file... can you tell if  the syntax appears correct? I am really at a loss and checked all of the obvious things. Some of the swfs that are not updating are really simple swfs with no scripts so I dont know why???
Your good at pointing out the obvious and maybe I am too braindead to see.  I am so close I just want to upload and be done!!
Thanks!  Sandra
xml code:
<?xml version="1.0" encoding="utf-8"?>
<SLIDE_SHOW>
    <PICTURE>intro/1.JPG</PICTURE>
    <PICTURE>intro/2.JPG</PICTURE>
    <PICTURE>intro/3.JPG</PICTURE>
    <PICTURE>intro/4.JPG</PICTURE>
    <PICTURE>intro/5.JPG</PICTURE>
</SLIDE_SHOW>   

Similar Messages

  • How to adjust the position of an image in a full screen slideshow

    Hi I'am using a full screen slideshow composition on my page and muse is not letting me adjust the position of the image to the top, middle or bottom of the frame under the fill option when the image is selected in the slideshow.
    I also find it very buggy when previewing the page in a browser, some time it re-sizes the image only larger but never scales down proportionately, only on rare occasions. Why does this happen? 
    Can someone please help ASAP I need to get this site done by tomorrow.
    Thanks,
    Gary

    Welcome to Apple Support Communities.
    The effect you're looking for is 'Scale'
    In Keynote '09, 5.1.1 select the graphic.
    Click Inspector in the tool bar, Build Inspector (3rd icon from the left), (Build In and Build Out are both set to None for this step) Effect, Action, and then Scale.
    It rescales ('zooms') the selected item (image) up or down from 0% to 200%
    Clicking on the More Options button at the bottom opens a drawer to the left, and gives you more control over how the build occurs, whether they happen automatically, timed, or when you click, and re-order build steps.
    At 200%, double the original size, resolution could be a problem. There is a workaround, because it also scales smaller, down to 0%. So I would scale the graphic down 'small' as the first step to fit at the bottom, (even hide it behind a background-colored box) as you scale it down, and then at the end, scale up to full size to fill the screen at 'normal' resolution.
    In the attached example, I use a 'scale' up to go from 100% to 130% on a map, and use arrows and a flashing line to point out the road where a specific business is located with 12 steps. Some elements in my slides have been intentionally obscured. For simplicity, I've eliminated showing any steps but the initial title and the scale.

  • Flash XML Slideshow - Load next image after set amount of time

    I'm creating flash xml slideshow and have managed to get the
    images to load from the XML file. What I want to do now is have a
    timer that loads the next image after x amount of seconds. Any help
    would be great.
    Code sample
    stop();
    // Create XML Object
    slideshow_xml = new XML();
    // Start slideshow once XML file is loaded
    slideshow_xml.onLoad = startSlideShow;
    //Load XML file
    slideshow_xml.load("slideshow.xml");
    //Ignore Whitespace in XML Document
    slideshow_xml.ignoreWhite = true;
    //Create Function for Slideshow - Shows first slide and
    initalises variables
    function startSlideShow(success) {
    if (success == true) {
    rootNode = slideshow_xml.firstChild;
    totalSlides = rootNode.childNodes.length;
    firstSlideNode = rootNode.firstChild;
    currentSlideNode = firstSlideNode;
    currentIndex = 1;
    updateSlide(firstSlideNode);
    function updateSlide(newSlideNode) {
    imagePath = newSlideNode.attributes.jpgURL;
    slideText = newSlideNode.firstChild.nodeValue;
    loadMovie(imagePath, loadTarget);
    }

    Ok I've managed to get most of this working including the
    alpha fade in. I haven't been able to get the images to fade out
    (fadeImageOut function) so if someone can tell me what I'm doing
    wrong. Also should I have some sort of preloader function for when
    each image loads? and if so any pointers, then it should be done
    except that I might need to add some text for each image in the XML
    file.
    stop();
    var container:MovieClip =
    this.createEmptyMovieClip("container", this.getNextHighestDepth());
    var loader1:MovieClip = this.createEmptyMovieClip("loader1",
    this.getNextHighestDepth());
    var loader2:MovieClip = this.createEmptyMovieClip("loader2",
    this.getNextHighestDepth());
    container._x = 0;
    container._y = 0;
    function fadeImageIn() {
    var fadeTween = new mx.transitions.Tween(loader1, "_alpha",
    mx.transitions.easing.Regular.easeIn, 0, 100, 1.5, true);
    loadmovie(imagePath, loader1);
    function fadeImageOut(loader1) {
    var fadeTween = new mx.transitions.Tween(loader1, "_alpha",
    mx.transitions.easing.Regular.easeOut, 100, 0, 1.5, true);
    unloadMovie(loader1);
    // Create XML Object
    slideshow_xml = new XML();
    // Find out what this does
    slideshow_xml.onLoad = startSlideShow;
    //Load XML file
    slideshow_xml.load("slideshow.xml");
    //Ignore Whitespace in XML Document
    slideshow_xml.ignoreWhite = true;
    //Create Function for Slideshow - Shows first slide and
    initalises variables
    function startSlideShow(success) {
    if (success == true) {
    rootNode = slideshow_xml.firstChild;
    totalSlides = rootNode.childNodes.length;
    firstSlideNode = rootNode.firstChild;
    currentSlideNode = firstSlideNode;
    currentIndex = 1;
    updateSlide(firstSlideNode);
    function updateSlide(newSlideNode) {
    imagePath = newSlideNode.attributes.jpgURL;
    slideText = newSlideNode.firstChild.nodeValue;
    //loadMovie(imagePath, loader1);
    fadeImageIn();
    function nextSlideImage() {
    nextSlideNode = currentSlideNode.nextSibling;
    if (nextSlideNode == null) {
    rootNode = slideshow_xml.firstChild;
    totalSlides = rootNode.childNodes.length;
    firstSlideNode = rootNode.firstChild;
    currentSlideNode = firstSlideNode;
    currentIndex = 1;
    updateSlide(firstSlideNode);
    } else {
    currentIndex++;
    updateSlide(nextSlideNode);
    currentSlideNode = nextSlideNode;
    slideTimer = setInterval(nextSlideImage, 5000);

  • Proportional Scaling external Image to stage

    Sounds confusing I know but basically I want to place some images on the stage and I want every image, whether big or small, portrait or landscape, to be scaled to about a quarter of the stage size.
    I have tried coding this myself and even tried many suggestions found on the web, but they all seem to do the same thing. The code either sizes every image to be equal in width and varying height, or scale every image to be equal in height with varying width.
    Say you have some images all the same size, but some in landscape orientation and some in portrait orientation. Most of the code I found for "proportional scaling" would scale the landscape images okay, but make the portrait images the same height as the others, so they looked alot smaller. Or the reverse was true.
    example:
    image.width = stage.stageWidth;
    image.height = stage.stageHeight;
    ( image.scaleX < image.scaleY ) ? image.scaleY = image.scaleX : image.scaleX = image.scaleY;
    This makes all the images fit on the stage all right, but they all have the same width. reversing the equality amkes all teh heights the same.
    If two images did not have the same width before they are scaled down, they should not have the smae width afterwards in my opinion.
    Sometimes I get some code that seems to work, then I change the stage size to check it and all the images did not scale to 1/4 of the stage new size when the FLA was run.
    I bet this is simple, but I have been working on it too long, y mind is in a knot!

    I loaded an array with a Loader and then used a random a variable to pick from the array using a variable that has the length of the array in it: here is the code, but the cut and paste does not wok that well.
    import com.greensock.TweenLite;
    var XMLURLLoader:URLLoader = new URLLoader();
    XMLURLLoader.load(new URLRequest("link to picasa photo rss feed"));
    XMLURLLoader.addEventListener(Event.COMPLETE, processXML);
    var media:Namespace=new Namespace("http://search.yahoo.com/mrss/"); imagesArray:Array = new Array();
    var imagesDateUploaded:Array = new Array();//The title properties of the XML File
    //var imagesWidth:Array = new Array();
    //var imagesHeight:Array = new Array();
    var imagesLength:uint;
    var imagesLoadedCount:int=0;//A counter, counts the images loaded
    var formatFont:Myriad = new Myriad();//This is the embedded font 
    var textformat:TextFormat = new TextFormat();//A TextFormat Object
    textformat.color=0xFFFFFF;
    textformat.font=formatFont.fontName;
    textformat.size=80;//Use the same size you used when embedding the font from the Library 
    var
    function processXML(event:Event):void {
    var XMLdata:XML=new XML(XMLURLLoader.data);
    imagesLength=XMLdata.channel.item.length();
    for (var i:uint=0; i < imagesLength; i++) {
      var loader:Loader = new Loader();
      loader.load(new URLRequest(String(XMLdata.channel.item[i].enclosure.@url)));
      imagesArray.push(loader);
      var imageDate:String=XMLdata.channel.item[i].pubDate.substr(6,10);
      imagesDateUploaded.push(imageDate);
      loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imagesLoaded);//A listener to the function that will be executed when an image is loaded
    function imagesLoaded(event:Event):void {
    imagesLoadedCount++;//Adds one to the imagesLoaded variable
    if (imagesLength==imagesLoadedCount) {//When all images are loaded
      prepareImages();//This function is explained in the next step  
      var maxSize:Number=stage.stageWidth/2;
    function prepareImages():void {
    //These actions will be applied to all the images loaded so we use a "for" and the "images" array to do that
    var i:uint = Math.floor(Math.random()*imagesLength);
    trace(i);
      var container:Sprite = new Sprite();//A container that will store the image, frame, TextField, TextField background and shadow
      var frame:Sprite = new Sprite();//The Frame Sprite
      var infoArea:Sprite = new Sprite();//The TextField background
      var infoField:TextField = new TextField();//The TextField
      //build the frames
      frame.graphics.beginFill(0xFFFFFF);
      frame.graphics.drawRect(-20, -20, imagesArray[i].width + 40, imagesArray[i].height + 40);
      frame.graphics.endFill();
      //creates a black rectangle in the bottom part of the image, where the TextField will be.
      infoArea.graphics.beginFill(0x111111, 0.5);//.5 is alpha
      infoArea.graphics.drawRect(0, 0, imagesArray[i].width, 100);//100 = height 
      infoArea.graphics.endFill();
      infoArea.y=imagesArray[i].height-100;
      //The following code sets the TextField properties and adds its contents
      infoField.defaultTextFormat=textformat;
      infoField.embedFonts=true;//You have to add this to use the embedded font  
      infoField.antiAliasType=AntiAliasType.ADVANCED;//This property will display the text more clearly
      infoField.width=imagesArray[i].width-5;
      infoField.height=100;
      infoField.text=imagesDateUploaded[i];//The content, obtained from the XML and stored in the Array
      //The images will have a random position based on the center of the Stage area. We use Math for that.
      //add a shadow filter
      //Distance, angle, color, alpha, blur, strength, quality
      var shadowFilter:BitmapFilter=new DropShadowFilter(3,90,0x252525,1,2,2,1,15);
      var filterArray:Array=[shadowFilter];
      container.filters=filterArray;//Apply the filter
      //adding children to container
      infoArea.addChild(infoField);//Adds the TextField to the TextField Background  
      container.addChild(frame);//Adds the Frame to the Container
    var bd:BitmapData= new BitmapData(imagesArray[i].width, imagesArray[i].height);
    var bmp:Bitmap = new Bitmap(bd);
    bd.draw(imagesArray[i]);
    container.addChild(bmp);
    // using the loader from the array directly was causing problems like only showing once.
    //  container.addChild(imagesArray[i]);//Adds the Image on top of the Frame in the Container  
      infoArea.visible=true;//We set the image information to invisible by default  
      container.addChild(infoArea);//Adds the information area in top of everything
      //resize the images to no more than 1/2 the image width or height compared to stage
      if (container.width>container.height) {// horizontal asset
       container.width=maxSize;
       container.scaleY=container.scaleX;
      } else {// vertical asset
       container.height=maxSize;
       container.scaleX=container.scaleY;
      container.x = Math.floor(Math.random()*(1+stage.stageWidth - container.width-20))+20;
      container.y = Math.floor(Math.random()*(1+stage.stageHeight - container.height-20))+20;
      //the  plus and minus 20 keeps the image in the stage boundary. something wrong with the container width calculations
      this.addChild(container);//Lastly, we add the Container to the Stage
      container.alpha = 0;
    TweenLite.to(container,1,{alpha:1});
      trace("Just added child");
    var timer:Timer = new Timer(5000,1);
    timer.addEventListener (TimerEvent.TIMER, initTimer);
    timer.start();
    function initTimer(event:TimerEvent):void{
    trace("Timer started");
    prepareImages();
    timer.reset()

  • Flash xml slideshow in iWeb not working

    Hallo
    I am really struggling to get a Flash xml slideshow to work.  I have used Flash Slideshow Maker app, which creates a slide.xml, .swf and .html file and everything is published in one folder "slideshow" on a local disk.
    I am using the following code and it works perfectly when viewed in iWeb:
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0, 40,0"
    WIDTH="920" HEIGHT="400" id="Phambili">
    <PARAM NAME=movie VALUE="/Users/elsjevanzyl/Documents/Websites/Published Websites/Phambili/Slideshow/Phambili.swf?xml_path=slides.xml">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME="wmode" value="transparent">
    <PARAM NAME=base VALUE=".">
    <EMBED src="/Users/elsjevanzyl/Documents/Websites/Published Websites/Phambili/Slideshow/Phambili.swf?xml_path=slides.xml" quality=high  wmode="transparent" WIDTH="920" HEIGHT="400"
    NAME="Phambili" ALIGN="" TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" base=".">
    </EMBED>
    </OBJECT>
    But as soon as I publish it to FTP with following code, it displays the slideshow but NOT the photos or thumbs:
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0, 40,0"
    WIDTH="920" HEIGHT="400" id="Phambili">
    <PARAM NAME=movie VALUE="http://harmonieproteas.co.za/Slideshow/Phambili.swf?xml_path=slides.xml">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME="wmode" value="transparent">
    <PARAM NAME=base VALUE=".">
    <EMBED src="http://harmonieproteas.co.za/Slideshow/Phambili.swf?xml_path=slides.xml" quality=high  wmode="transparent" WIDTH="920" HEIGHT="400"
    NAME="Phambili" ALIGN="" TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" base=".">
    </EMBED>
    </OBJECT>
    I have also tried iFrame code, but this is not working at all.
    Can anybody tell me what I am doing wrong when publishing the above code to FTP?
    Any help will be appreciated.

    Flash isn't my thing but, it appears that you are missing the images:
    <flash_parameters copyright="socusoftFSMTheme">
    <preferences> 
    <global> 
    <basic_property movieWidth="920" movieHeight="400" decoration="" html_title="Title" loadStyle="Pie" startAutoPlay="true" continuum="true" backgroundColor="0x00000000" hideAdobeMenu="true" photoDynamicShow="true" enableURL="true"transitionArray="" socusoftMenu="false"/> 
    <title_property showTitle="true" photoTitleColor="0x00000000" backgroundColor="0x00c0c0c0" alpha="30" autoHide="true"/>
    <music_property path="" stream="true" loop="true"/>
    <photo_property topPadding="2" bottomPadding="64" leftPadding="2" rightPadding="2"/>
    <properties enable="true" backgroundColor="0x00c0c0c0" backgroundAlpha="30" cssText="a:link{text-decoration: underline;} a:hover{color:#ff0000; text-decoration: none;} a:active{color:#0000ff;text-decoration: none;} .blue {color:#0000ff; font-size:15px; font-style:italic; text-decoration: underline;} .body{color:#ff5500;font-size:20px;}" align="top"/>
    </global>
    <thumbnail> 
    <basic_property width="40" height="40" thumBackColor="0x002c2c2c" borderColor="0x002c2c2c" thumborder="2" thumSpacing="4" shapeAlpha="60" buttonColor="0x00000000" currentbuttonColor="0x00ffffff"/> 
    </thumbnail>
    </preferences>
    <album> 
    <slide jpegURL="thumbs/mozzie tour 2.jpg" d_URL="slides/mozzie tour 2.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Mozzie Tour 2" width="916" height="334"/> 
    <slide jpegURL="thumbs/mozzie10.jpg" d_URL="slides/mozzie10.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Mozzie10" width="916" height="334"/>
    <slide jpegURL="thumbs/snow on hogsback.jpg" d_URL="slides/snow on hogsback.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Snow on Hogsback" width="916" height="334"/>
    <slide jpegURL="thumbs/tea time@santa maria.jpg" d_URL="slides/tea time@santa maria.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Tea Time@Santa Maria" width="916" height="334"/>
    <slide jpegURL="thumbs/western cape tour knersvlakte.jpg" d_URL="slides/western cape tour knersvlakte.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Western Cape Tour Knersvlakte" width="916" height="334"/>
    <slide jpegURL="thumbs/western cape tour[2].jpg" d_URL="slides/western cape tour[2].jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Western Cape Tour[2]" width="916" height="334"/>
    <slide jpegURL="thumbs/bush camp in botswana[2].jpg" d_URL="slides/bush camp in botswana[2].jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Bush Camp in Botswana[2]" width="916" height="334"/>
    <slide jpegURL="thumbs/eastern cape tour 2.jpg" d_URL="slides/eastern cape tour 2.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Eastern Cape tour 2" width="916" height="334"/>
    <slide jpegURL="thumbs/hogsback 2.jpg" d_URL="slides/hogsback 2.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Hogsback 2" width="916" height="334"/>
    <slide jpegURL="thumbs/mozzie tour.jpg" d_URL="slides/mozzie tour.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Mozzie Tour" width="916" height="334"/>
    <slide jpegURL="thumbs/western cape tour.jpg" d_URL="slides/western cape tour.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Western Cape Tour" width="916" height="334"/>
    </album>
    </flash_parameters>
    http://harmonieproteas.co.za/Slideshow/

  • How to get rid of the large slideshow images in Web gallery (CS4)

    Here is the deal.
    I've created a flash web gallery/ But the new CS4 has the option for slideshow with this flash stuff. CS3 use to create thumbnail and large images folders. The new one creates 3 folders: 1. thumbnails, 2, medium images, 3 large images (for the slideshow). That's great, until I go to upload process. I have pretty limited space. So I'm ready to get rid of the slideshow option, but there's no such option in gallery creating process. The only solution I have in mind is to redirect slideshow images to the medium size folder. But thats pretty annoying process during the creation of each gallery.
    So does anyone has an idea how to skip the slideshow creation or another method to skip creating 3 folders, all with the same images?

    Extend DefaultListCellRenderer, not BasicComboboxRenderer. Here's an example that wraps the original renderer and uses it where possible (i.e. instanceof JLabel). No 'white square'.import java.awt.BorderLayout;
    import java.awt.Component;
    import java.text.DecimalFormat;
    import javax.swing.*;
    public class ComboRendererTest {
      public static void main(String[] args) throws Exception {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            new ComboRendererTest().makeUI();
      public void makeUI() {
        JComboBox comboBox = new JComboBox();
        comboBox.addItem(new Double(1));
        comboBox.addItem(new Double(2.25));
        comboBox.addItem(new Double(3.5));
        comboBox.setRenderer(new TwoDecimalRenderer(comboBox.getRenderer()));
        JFrame frame = new JFrame();
        frame.add(comboBox, BorderLayout.NORTH);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(200, 200);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    class TwoDecimalRenderer extends DefaultListCellRenderer {
      private ListCellRenderer defaultRenderer;
      private static final DecimalFormat FORMAT = new DecimalFormat("#.00");
      public TwoDecimalRenderer(ListCellRenderer defaultRenderer) {
        this.defaultRenderer = defaultRenderer;
      @Override
      public Component getListCellRendererComponent(JList list, Object value,
              int index, boolean isSelected, boolean cellHasFocus) {
        Component c = defaultRenderer.getListCellRendererComponent(list, value,
                index, isSelected, cellHasFocus);
        if (c instanceof JLabel) {
          ((JLabel) c).setText(FORMAT.format(value));
        } else {
          c = super.getListCellRendererComponent(list, value,
                  index, isSelected, cellHasFocus);
          setText(FORMAT.format(value));
        return c;
    }db

  • Loading new xml data into a already xml populated image display

    Hi everybody,
    I have a question about loading new xml data into a already xml populated image gallery.
    So I have my gallery set up so it calls some xml when it first loads. What I would now like to do is load different sets of images via a different xml sheet via the click of a button.
    So for example the loaded gallery already has all thumbs loaded and user can click on them to view the full size image. So next instead of the user having to close this gallery to allow a new gallery to open with a different set of pictures I would just like to have a button. This button will unload the existing thumbs from the gallery and load in new ones from a different xml file.
    If anybody can help me with this it would be great as I am still on a steep learning curve with AS3.
    Here is my AS3
    var xmlPath:String = "pictures.xml";
    var xml:XML;
    var loader = new URLLoader();
    loader.load(new URLRequest(xmlPath));
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    function xmlLoaded(e:Event):void
         if ((e.target as URLLoader) != null )
              xml = new XML(loader.data);
              createMenu();
    var numberOfItems:uint = 0;
    var menuItems:Array = new Array();
    function createMenu():void
              numberOfItems = xml.items.item.length();
         var count:uint = 0;
              for each (var item:XML in xml.items.item)
              var imageLoader=new Loader();
              var menuItem:MenuItem = new MenuItem();
              menuItem.addChild(imageLoader);
              imageLoader.load(new URLRequest(item.url));
              menuItem.linkTo = item.linkTo;
              menuItem.mouseChildren = false;
              menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
              menuItems.push(menuItem);
              addChild(menuItem);
              count++;
    function ***():void
         //menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
         for (var i:uint = 0; i < menuItems.length; i++)
              setChildIndex(menuItems[i], i);

    Thanks so much for the reply Andrei1
    I think maybe my lack of knowledge when it comes to AS3 is not helping me at the moment because I thought I understood the code you supplied but there is something not going quite right.
    So I messed around with the code and added the new_loaded_thumbs_btn to load in the "new_pictures.xml" but I am def doing something wrong.
    import flash.ui.ContextMenuItem;
    var xmlPath:String = "pictures.xml";
    var xml:XML;
    var numberOfItems:uint = 0;
    var menuItems:Array = new Array();
    var loader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    loadXML("pictures.xml");
    new_loaded_thumbs_btn.addEventListener(MouseEvent.CLICK, loadXML);
    function loadXML(path:String):void {
         loader.load(new URLRequest("new_pictures.xml"));
    function loadXML(path:String):void {
         loader.load(new URLRequest(path));
    function xmlLoaded(e:Event):void
         xml = new XML(loader.data);
         createMenu();
    function createMenu():void
         clearMenu();
         numberOfItems = xml.items.item.length();
         var count:uint = 0;
         var imageLoader;
         var menuItem:MenuItem;
         for each (var item:XML in xml.items.item)
              imageLoader = Loader();
              menuItem = new MenuItem();
              menuItem.addChild(imageLoader);
              imageLoader.load(new URLRequest(item.url));
              menuItem.linkTo = item.linkTo;
              menuItem.mouseChildren = false;
              menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
              menuItems.push(menuItem);
              addChild(menuItem);
              count++;
         sortChildren();
    // removes previously placed objects
    function clearMenu():void {
         var menuItem:MenuItem;
         while (menuItems.length > 0) {
              menuItem = menuItems[0];
              removeChildAt(getChildIndex(menuItem));
              menuItem.shift();
    function sortChildren():void
         //menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
         for (var i:uint = 0; i < menuItems.length; i++)
              setChildIndex(menuItems[i], i);
    When the image display 1st loads it displays the new_pictures.xml thumbs which I thought would load through my new button when clicked.
    And there was me thinking I was getting the hang of AS3.
    Could you please point me in the right direction in what I am doing wrong,
    Thanks for your time and effort in advance

  • Why are my slideshow images interfering with other slideshow images?

    On my site, I have a specific slideshow for the home page. I have also set up two other slideshows on my site that include completely different images. In each individual slideshow, I uploaded separate images from separate folders. I am confused as to why one of the slideshows images keeps on appearing in all of the slideshows.
    Here is a link to my site im working on:
    kianstewart.com
    Navigate to the portfolio view a few of the links, and also try navigating back to the home page.
    Kian

    Hi Kian
    This can happen if you have copied the slideshow from one page to another and then tried to change the image, please check the image linked and relink them again.
    Thanks,
    Sanjit

  • Slideshow image quality/color rendering

    I´m quite frustrated after discovering that some of my images look quite poor displayed by the slideshow module. My situation ist as follows:
    LR 5.2 running on Mac OS X 10.8.5, 1:1 previews are rendered, preview quality is set to high, and I´m using a sample image showing a dark cloudy sky with some fine gradients; my slideshow preset doesn´t use any borders as I read this often causes quality issues.
    When I´m in the Develop module, there is no problem at all, even in fullscreen display mode on my 1920x1200 display the gradients are perfectly rendered.
    In Library module, when displaying fullscreen, quality is okay, but I can see some slight difference compared to the Develop module - which I understand after reading that in Develop the output is based on the actual raw data, and in all the other modules on rendered previews.
    Now, when in Slideshow module, the image quality is significantly lower than in Library and I see some quite obvious banding in the gradients. I don´t have problems with blocking artifacts but the banding/posterization is considerably worse compared to a JPEG export with a quality setting of, for example, 75.
    I can´t imagine LR´s slideshow tool would be working with a lower color depth than the 8 bit as in standard JPEGs, right? Did I miss any of LR´s parameters that influence the image quality of Lightroom slideshows or of the previews used therefore? Otherwise do you have some other explanations or hints for me in order to get this fixed? We do everything to capture our images in the best possible quality so we should also be able to present them properly after all...
    Thanks a lot for any advice!
    Toby

    In-Lr slideshow images look like crap on my system too (dull contrast and de-saturated shifted color).
    My guess is some issue with icc-profile/monitor-profile or something, but I'm not qualified for assessing.. - could just be a bug in Lr that only bites some, dunno...
    I use ShowBiz instead, which works well on my Windows box, and it should also work on your Mac box.
    Rob

  • Difficulty positioning drop zone images

    I have carefully and repeatedly read the sizing and positioning instructions for images in iDVD drop zones. I am just not "getting it". There must be more info. somewhere about putting predictability into this process. The photo does not appear in the desired size and position.

    My apologies to the person I got this from—cannot find it now. But, OT, here's what works great:
    1) Open a new Appleworks (or Word) word processing document. I know this is unsophisticated, but this standard 8 1/2 x 11" document seems to be the key to the process.
    2) Set the document margins to very thin. like 1/10".
    3) Place (paste) your photo into the document.
    4) The portion of the picture that you want to show in the drop zone—place it at the top of the document and slightly to the right.
    5) Use the "create pdf" function within the print dialog box to create a pdf document.
    6) Drag the resulting pdf document into the drop zone well.
    7) Look at the results. In the original word processing document, adjust the photo size and position as desired. Then, make another pdf.
    8) Drag your adjusted pdf into the drop zone well.
    As I said before, this worked great for me after spending a whole day trying to find a solution. I feel liberated. Thanks to the original author, whomever it may be.

  • Full Screen Slideshow image sizing issue

    Hi all,
    I am creating full screen slideshow for the first time.
    I have added the slideshow into the DEISGN mode and it all looks perfectly fine. However, once I am in PREVIEW or PREVIEW IN BROWSER mode the image is at fullscreen but it seems to be zoomed in or cropped tighter.
    The slideshow images are set to FILL FRAME PROPORTIONALLY. I have tried experimenting with different settings, page sizes, changing margins, changing header/footer guides, different image sizes etc... but no success.
    I am on a 27-inch (2560 x 1440) IMAC.
    help???
    I have attached two images to show what I mean. Notice in PREVIEW mode how the image appears to be tighter/cropped/magnified.
    Thanks

    Thanks Zac,
    So do you think I should change to Fit Content Proportionally?
    And then recrop my images so the aspect ratios match my browser window or the page dimensions in Muse?
    Sorry if these are stupid questions. I'm new to all this

  • I can swipe slideshow images but can I swipe pages in tablet version

    I can swipe slideshow images but can I swipe pages in tablet version

    What swiping is involved with making purchases?
    Try a reset. Press & hold the Power and Home buttons simultaneously, ignoring the red power off slider, until the Apple logo appears. Then release both buttons. This should not affect any content on the iPad, it is similar to rebooting your computer.

  • How to modify the code to use the image on stage instead of in library?

    Hi, The following code I found on website is for working with the image which is in library. But how to modify it to work with the image on stage. Because I don't want to use it from the library. The second question ------ Is it the AS2 code or AS3. If it is AS2 code then please let me know how to modify it to work with AS3. animator = CreateEmptyMovieClip('animator',1);
    bg_1 = animator.attachMovie('bg_mc','bg_1',1);
    bg_2 = animator.attachMovie('bg_mc','bg_2',2);
    bg_1._x = bg_1._width/2:
    bg_2._x = bg_2._width/2:
    speed = 1;
    cloudWidth = 380;
    animator.onEnterFrame = function(){
    bg_1._x -= speed:
    bg_2._x -= speed:
    if(bg_1._x <= -bg_1._width) bg_1._x = cloudWidth;
    if(bg_2._x <= -bg_2._width) bg_2._x = cloudWidth;
    } Thanks.

    There is no need for attach the clip if it is not in the library and it is the AS2 code below is the relevant code in AS3 when it is in stage:
    i) Convert your first image into a movieclip with the instance name "bg_1"
    ii) Convert your second image into a movieclip with the instance name "bg_2"
    iii) Actions:
        var speed:Number = 1;
        var cloudWidth:Number = 380;
        bg_1.x = bg_1.width/2:
        bg_2.x = bg_2.width/2:
        this.addEventListener(Event.ENTER_FRAME,fn);
        function fn(e:Event):void{
            bg_1.x -= speed:
            bg_2.x -= speed:
            if(bg_1.x <= -bg_1.width) bg_1.x = cloudWidth;
            if(bg_2.x <= -bg_2.width) bg_2.x = cloudWidth;

  • XML and Images MAC CS3

    Hi,
    if I try to import an XML with images on the Mac, InDesign will not allow me to use the tilde '~' for the users home directory. I.e. paths like this cannot be handled:
    file:///~/Library/Preferences/Adobe InDesign/Version 5.0/Scripts/Scripts Panel/logos/myEPS.eps
    But instead this one is OK.
    file:///Users/stefanrakete/Library/Preferences/Adobe InDesign/Version 5.0/Scripts/Scripts Panel/logos/my.eps
    Can anyone confirm this?
    Stefan

    Hi,
    if I try to import an XML with images on the Mac, InDesign will not allow me to use the tilde '~' for the users home directory. I.e. paths like this cannot be handled:
    file:///~/Library/Preferences/Adobe InDesign/Version 5.0/Scripts/Scripts Panel/logos/myEPS.eps
    But instead this one is OK.
    file:///Users/stefanrakete/Library/Preferences/Adobe InDesign/Version 5.0/Scripts/Scripts Panel/logos/my.eps
    Can anyone confirm this?
    Stefan

  • Slideshow images not showing on website

    I published my website to a folder, then uploaded it to hosting site using Fetch.
    All pages and images show correctly, except for slideshow images on one page of my site.
    I am using Linux OS.
    Any suggestions as to what might be causing this?
    Did I build the website correctly?
    Thanks for your help!
    luckydogdesign

    kvetski wrote:
    > I am having problems uploading images to one page of my
    website -
    >
    http://www.fiebigershoes.com/press.html
    > All images are in the same image folder and when i
    preview this page it works
    > perfectly fine however when i upload it to my website
    the bottom 3 images do
    > not show up.
    > i believe i have a problem with the images as when i
    replace these with an
    > image on the top row it works fine on my website. Any
    advice?
    >
    1. Firstly make sure that you have actually uploaded the
    images to the
    server. At the moment I'm getting an error page when I try to
    get to
    them directly via the browser. This could mean they aren't at
    the
    location where the browser is expecting them to be.
    2. If that isn't the problem make sure they are saved in RGB
    color mode
    and not CMYK

Maybe you are looking for

  • Mini DisplayPort to S-Video or RCA (yellow)

    I know this has been addressed in other topics by other people, but I was wondering what the final outcome of all the discussion was. Is it possible to connect my MacBook Pro 13-inch with Mini DisplayPort to female S-Video or RCA (composite--yellow c

  • Problems displaying BO reports in an iframe in Firefox

    Hi, I have an aspx page which has an iFrame. I have provided the src for this iFrame as the BO report. When I open this page in IE, the report comes up properly. However when I open this page in Firefox, the report does not display. However if I open

  • How to install certs for web access

    Hi all: While I have done this several times using ConsoleOne in previous versions of GW, I cannot seem to find a good write-up on installing certificates for Web Access in GW 2014. I came across this TID (https://www.novell.com/support/kb/doc.php?id

  • What is the CX 310-080 ?

    i need know what this is the exam CX 310-080 Sun Certified Web Component Developer for the Java 2EE Platform am passed the 310-081 after examination see this exam please provied me the information thanks

  • Exclude date filter.. no data

    hi, my scenario is that im reporting on an infoset . the query has an exclude date filter(1/1/1800,31/12/9999).query for this is there on both production and dev systems. but the report is not getting populated in the dev side(no applicable data foun