Remove the "appear" event in the constructor:
instead
this.getContentElement().createFlash();
this._loading();
in the constructor
and two new events:
events :
{
/**
* Fired when the flash object still is loading.
*
* The loading action can be prevented by calling
* {...@link qx.event.type.Event#preventDefault} on the event object
*/
"loading" : "qx.event.type.Event",
/**
* Fired after the flash object has been loaded.
*
* The loaded action can be prevented by calling
* {...@link qx.event.type.Event#preventDefault} on the event object
*/
"loaded" : "qx.event.type.Event"
},
and add the following functions:
_loading : function(e)
{
if(!this.isLoaded())
{
var timer = qx.util.TimerManager.getInstance();
timer.start(this._loading, 0, this, null, 10);
this.fireEvent("loading");
}
else
{
this.fireEvent("loaded");
}
},
isLoaded : function()
{
return this.getPercentLoaded() == 100;
},
getPercentLoaded : function()
{
var flashFE = this.__flashObj.getFlashElement();
// First make sure the movie is defined.
if(typeof(flashFE) != "undefined")
{
return flashFE.PercentLoaded();
}
else
return 0;
}
},
Stefan
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel