0

Background image changing on particular frequency

Hi I am trying to have a background image on a full view screen and I have some controls on tops of it. I need the back ground image to change for every 5 or 10 seconds and the controls need to be there where they are.

I created a timer and inside the function I am loading the image as follows: this.controls.timer = KONtx.utility.timer.setInterval(this._test.bindTo(this),5000);

_test: function() { this.config.count = this.config.count 1; if(this.config.count == 4) { this.config.count = 1;

} this.controls.centeredLogo1 = new KONtx.element.Image({ src: "[path]" this.config.count ".jpg", styles: { width: 960, height: 540, hOffset: 0, vOffset: 0 } }).appendTo(this.controls.centeredLogo); }, createView: function() { this.controls.timer = KONtx.utility.timer.setInterval(this._test.bindTo(this),5000); this.controls.centeredLogo = new KONtx.element.Image({ src: "[path]", styles: { width: 960, height: 540, hOffset: 0, vOffset: 0 } }).appendTo(this);
}

I do not get any errors, but it doesnt update the image. Am I missing something or is there any way I could achieve this functionality.

by
1 Reply
  • Got it working....

    Just replace the below code: this.controls.centeredLogo1 = new KONtx.element.Image({ src: "[path]" this.config.count ".jpg", styles: { width: 960, height: 540, hOffset: 0, vOffset: 0 } }).appendTo(this.controls.centeredLogo);

    with

    this.controls.ceneteredLogo.setSource([new url]);

    0

Recent Posts

in General - Yahoo! TV Widgets