1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    1
    Vote Rating
    0
    pusemuckl312 is on a distinguished road

      0  

    Default Unanswered: Carousel: Pictures

    Unanswered: Carousel: Pictures


    Hey guys,
    I've got a problem with the carousel function. I want to switch between several pictures on one site but I do not know how to do this. Could you please help me?
    Thank you

    My Code is:

    Code:
    new Ext.application({  launch: function(){
        
        var carousel = Ext.create("Ext.Carousel",{
          flex: 1
        });
        
        var seiten = ["site.html","site2.html","site3.html"];
        
        for(i in seiten) {
          Ext.Ajax.request({
              url: seiten[i],
              success: function(response){
                var seite = Ext.create("Ext.Panel",{
                  html: response.responseText
                });
                carousel.add(seite);
              }
          });
        }
        
        Ext.create("Ext.Container",{
          fullscreen: true,
          layout: "vbox",
        });
    	carousel
      }
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,524
    Vote Rating
    873
    Answers
    3563
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Instead of this code (I'm sure it was a copy/paste/typo as it's invalid):

    Code:
        Ext.create("Ext.Container",{
          fullscreen: true,
          layout: "vbox",
        });
    	carousel
    Just do this:

    Code:
    Ext.Viewport.add(carousel);
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread