[Papervision3D] FW: BitmapFileMaterial cached load events firing too early
Alan Skinner
alan.skinner at digimania.com
Mon Jan 5 05:54:50 PST 2009
Hi everybody.
Im having a problem with BitmapFileMaterial, although i may be using it wrong.
my code is as follows
Line 1: var bmpMaterial :BitmapFileMaterial;
Line 2: bmpMaterial = new BitmapFileMaterial(asset.ThumbnailUrl, false);
Line 3: bmpMaterial.addEventListener(FileLoadEvent.LOAD_COMPLETE, onFileComplete, false, 0, true);
I create a plane and will eventually set the material of this plane to this bitmap material
Now if i wait until this material has fully loaded and then add a second plane with a new BitmapFileMaterial but using the same URL.
The BitmapFileMaterial recognises that this URL has already been loaded and fires the load complete event!
this all happens in the BitmapFileMaterial constructor (Line 2) and before i attach my event listener (Line 3).
therefore i never get the message that my URL has loaded
seeing as i need this message so i can hide the loading bar and attach the image properly this is not good.
Any ideas am i doing this wrong, how can i attach my event listener before the cached image load event fires!
At the moment i have disabled bitmap/url caching on the BitmapFileMaterial by removing references but its not the ideal solution.
any ideas would be great!!
Cheers, alan
--
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.
If you have received this email in error please notify the
originator of the message. This footer also confirms that this
email message has been scanned for the presence of computer viruses.
Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of DA Group.
Yomego is an entertainment division of DA Group (UK) Limited a
company registered in Scotland with registration number SC121558
having its registered office at The Lighthouse, 70 Mitchell Street,
Glasgow, G1 3LX.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090105/529cf382/attachment.html>
More information about the Papervision3D
mailing list