Pushing Loader.content into DisplayObject Freezes Animation
i working on slideshow app involves bunch of images mask effects cycling 1 after other. created buffer preload images in background while animation plays. using tweener tweens, , has nothing garbage collection or declaring vars inside function scope. problem following lines of code in complete handler of flash.display.loader class cause animation freese split second:
_preloadingslide.source = _preloader.content;
_preloadingslide.loading = false;
_preloadingslide.loaded = true;
_preloadingslide insctance of custom class extends sprite. source attribute setter/getter whos code follows:
public function set source( value:displayobject ):void{
_source = value; //_source of type displayobject
if( _source!= null ){
addchild( _source );
}
}
i have isolated error these lines of code. when halt execution while buffering , wait until images loaded there no issue. whenever these line execute freezes animation half second or so. thought maybe had internal copying bytearray flash doing. have ideas?
lots of things can happen when adding child. use profiler see other things might running, or try stepping addchild call
alex harui
flex sdk developer
adobe systems inc.
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment