This is really tricky, but it seems to work for me now.
/*
*
* In the following order the errors occur:
* 1. flash element equals underfined, which means that the flash
object has not been added to the DOM tree.
* 2. flash object has not received an identity, which is accessible
yet.
* 3. the flash object has not been loaded enough to access the viewer
functions.
*
*/
getPercentLoaded : function()
{
var flashFE = this.__flashObj.getFlashElement();
// First make sure the movie is defined and has received a non-zero
object id.
if(typeof(flashFE) != "undefined" && flashFE != null)
{
try
{
return flashFE.PercentLoaded();
}
catch(err)
{
// Not an accessible function yet.
return 0;
}
}
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