Results 1 to 2 of 2

Thread: Carousel: Pictures

  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    1
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3931
    Vote Rating
    1272
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •