[Fling] [Flashcoders] Misreporting instanceof operator.
Chris Allen
mrchrisallen at gmail.com
Wed Aug 23 12:23:06 EDT 2006
BTW, there is a unit test to recreate the problem. It can be found here:
http://svn1.cvsdude.com/osflash/fling/DEV_Source/classes/org/osflash/fling/tests/TestMovieAsset.as
See testShowMovie()
-Chris
On 8/23/06, Chris Allen <mrchrisallen at gmail.com> wrote:
> On 8/23/06, Peter Hall <peterjoel at gmail.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/osflash/fling/DEV_Source/classes/org/osflash/fling/util/assets/
>
> 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
>
More information about the Fling
mailing list