Hello,

I'm starting to use Clutter tool kit to build some eyes-candy application.
I'm using Perl to perform quick development.

I'm using perl-Clutter-0.8.0.1 with libclutter-0.8.0 from my Linux distribution.

I'm try to use Timeline to move some graphical objects with following
script, but red square does'nt move anyway. Could you

Thanks in advance,

Stephane Este-Gracias

_________________________________________________________
#!/bin/perl

use strict;
use warnings;

use Glib;
use Clutter;

use Glib qw( :constants );
use Clutter qw( :init );

my $stage = Clutter::Stage->get_default();
$stage->signal_connect(key_press_event => sub { Clutter->main_quit(); });

my $group = Clutter::Group->new();
$stage->add($group);

my $rect = Clutter::Rectangle->new();
$rect->set_size(100, 100);
$rect->set_position(0, 0);
$rect->set_color(Clutter::Color->new(255, 0, 0, 255));
$group->add($rect);

my $timeline = Clutter::Timeline->new_for_duration(5000);
$timeline->set(loop => TRUE);

my $alpha = Clutter::Alpha->new($timeline, undef);
my $behave = Clutter::Behaviour::Path->new($alpha,
        [   0,   0 ],
        [   0, 150 ],
        [ 240, 150 ],
        [ 240,   0 ],
        [   0,   0 ],
      );
$behave->apply($group);
$timeline->start();

$stage->show();

Clutter->main();
_________________________________________________________
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to