JFXStudio: sketch, hack, share

Simple News Ticker

Posted by: Rakesh Menon on: June 19, 2009

News ticker based on Yahoo RSS feed, implemented using RssTask API.

For Applet mode, click on above image

For standalone mode

Source available here

2 Responses to "Simple News Ticker"

Hi,
I have a question.
Why, when I drag the this Stage it sometimes is jumping on the screen?
I always have the same problem when I do own transparent javafx Stage.
Is it a bug in javafx?

But in http://javafx.com/samples/EffectsPlayground/index.html when I drag the stage I don’t see this bad effect.

Where is difference?
Do you have the same?

@rafik Sorry about that, the drag code in that sample is not reliable.
Below is better. Yes javafx samples are updated to use this new code.

var stageDragInitialX:Number;
var stageDragInitialY:Number;

var bgRect = Rectangle {
    onMousePressed: function(e) {
        stageDragInitialX = e.screenX - stage.x;
        stageDragInitialY = e.screenY - stage.y;
    }
    onMouseDragged: function(e) {
        stage.x = e.screenX - stageDragInitialX;
        stage.y = e.screenY - stageDragInitialY;
    }
}

Leave a Reply

Challenge: Small is the New Big

This month's challenge: code something cool in only 30 lines, using the theme of Five

Tags

Archives