Instead of solving the problem I tried to work around it (and did).
On the internet I found some information that was usefull. The setMask only seems to work fine when the jpg is loaded completely. They looked at the _width property to make sure the load is complete so I did the same.
I still don't know how to solve the other problem (duplicating a loaded jpg) so instead of doing that I just load it several times.
The result is a working example.
Can someone tell me if the flash player is intelligent enough to load it one time for real and the other times virtual (cache) and if loading it several times takes up more memory ?
I don't know how things are handled internally.
Wilbert
