-
28 Dec 2012 3:56 AM #1
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 } });
-
30 Dec 2012 8:58 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3161
Instead of this code (I'm sure it was a copy/paste/typo as it's invalid):
Just do this:Code:Ext.create("Ext.Container",{ fullscreen: true, layout: "vbox", }); carousel
Code:Ext.Viewport.add(carousel);
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote