List Info

Thread: Misreporting instanceof operator.




Misreporting instanceof operator.
user name
2006-08-23 16:08:58
On 8/23/06, Peter Hall <peterjoelgmail.com> wrote:
> Perhaps you have a class associated with the symbol,
which does not
> extend MovieClip?
>
Well the instance of MovieClip, or whatever it is in this
case, is a
part of a class that doesn't extend MovieClip (MovieAsset).
MovieAsset
implemts and Asset interface and extends an AbstractAsset
class that
does much of the general leg work. The MovieAsset class has
a method
getResource() that returns an Object, in this particular
case it's the
MovieClip in question. So when accessing this MovieClip
using this
class you must call getResource() and cast it to MovieClip:

var movie:MovieClip = MovieClip(asset.getResource());
movie._visible = true;

You can take a look at what we are working on here:
http://svn1.cvsdude.com/o
sflash/fling/DEV_Source/classes/org/osflash/fling/util/asset
s/

To replicate the problem you have to set
MovieAsset.setHideWhenLoaded(true); then once the
loadComplete event
is triggered you try to set the MovieClip to visible:
MovieClip(asset.getResource())._visible = true;

You should then see that it doesn't work.

Thanks for your help!

-Chris

_______________________________________________
Fling mailing list
Flingosflash.org
http://osflash.org/mailman/listinfo/fling_osflash.org
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )