Dear All:

I met a problem that has been really troubling me.

I want to make actors one after one in a time out callback and then add them
into stage one by one.

But I can see ONLY ONE actor shown on stage.

Any idea why?

Thanks a million.

-- 
Best Regards
#include <clutter/clutter.h>

ClutterStage *stage;

static int
update_actor(void *arg)
{
	static float m = 0;
	ClutterActor* actor = clutter_texture_new_from_file("redhand.png", NULL);

	clutter_actor_set_position(actor, 200, m);
	clutter_container_add_actor(CLUTTER_CONTAINER(stage), actor);
	clutter_actor_show_all(CLUTTER_ACTOR(stage));
	m += 10;

	return 1;
}

int
main(int argc, char *argv[])
{
	clutter_init(&argc, &argv);

	stage = (ClutterStage *) clutter_stage_get_default();

	g_timeout_add(1000, update_actor, NULL);

	clutter_main();

	return 0;
}

Reply via email to