Jump to content
Search Community

bildschirmsport

Members
  • Posts

    7
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Location
    Hamburg, Germany

bildschirmsport's Achievements

0

Reputation

  1. Ok, I'll try to extract an example from my project and send you FLA. But right now "deadlines are looming". Maybe I'll get to it later this evening. I'm using the latest classes and I tried it with the SWC from my GreenSock account and with the classes downloaded at www.loadermax.com. Same result. I'll get back to you with an example FLA as soon as possible. Thanks for your support.
  2. Hi Jack, I think I boiled it down to the point where I can say there definitely is a bug in the VideoLoader class. The problem seems to be related to the autoPlay attribute within the vars object. Here the code: _queue = new LoaderMax({ name:"queue", auditSize:true, onComplete:handleQueueComplete, onProgress:handleQueueProgress }); _queue.append( new SWFLoader( fontsURL, { name:"fonts", context:currentLoaderContext } ) ); _queue.append( new SWFLoader( appURL, { name:"app", context:currentLoaderContext } ) ); _queue.append( new VideoLoader( flvURL, { name:String(1), autoPlay:false, smoothing:true } ) ); _queue.load(); In the code above the queue is never finished. At least the onComplete function is never called and the progress value never reaches 1. When I change autoPlay to true everything works like a charm. I also tested this with the code I initially posted and with autoPlay:true for the VideoLoader instances it works. Hope this helps. David
  3. Hi, I continued experimenting with the VideoLoader and came across a strange issue. The context is that I have a queue with several VideoLoader instances, some initially paused and others not. I want to cache the first two videos, then start the first video and and continue loading the rest. All instances are appended to a LoaderMax instance. I need the VideoLoader instances in a LoaderMax instance, because I work with the queue in another part of my application where it would be handy to have them in an array like storage. The queue code looks more or less like this: _queue = new LoaderMax({ name:"queue", auditSize:true, onComplete:handleQueueEvents }); _queue.append( new SWFLoader( fontSWF, { name:"fonts", context:currentLoaderContext } ) ); _queue.append( new SWFLoader( appSWF, { name:"app", context:currentLoaderContext } ) ); var videoQueue:LoaderMax = new LoaderMax({ name:"videoQueue" }); for( var i:uint=0; i{ videoQueue.append( new VideoLoader( videos[i], { name:String(i), autoPlay:false, bufferMode:false, paused:i>2 } ) ); } _queue.append( videoQueue ); _queue.load( ); private function handleQueueEvents( event:LoaderEvent ):void { var videoQueue:LoaderMax = _queue.getLoader("videoQueue") as LoaderMax; for( var i:int = 0; i < videoQueue.numChildren; i++ ) { var loader:VideoLoader = videoQueue.getLoader(String(i)) as VideoLoader; // 1) if( loader.paused ) loader.resume(); // 2) loader.load(); // 3) loader.vars.paused = false; } // 3) videoQueue.load(); } So, the problem is that I couldn't find a way to resume/load the initially paused loaders. 1) Although loader.paused returns true, the loader can not be resumed with loader.resume(); 2) loader.load() doesn't load the video either. 3) This was a kinda desperate approach. I tried setting the paused attribute of the vars object to true and then load the queue again. Already loaded VideoLoader instances would be skipped, and the unpaused instances would be loaded. Then again I realized the vars Object is only there to initialize the loader and doesn't have an affect on the loader when changed afterwards. Right? And videoQueue.load() doesn't work because the status is 2 (LoaderStatus.COMPLETED). So calling load() doesn't make sense to the queue. Did I something wrong? Or did I misunderstood the init attribute paused? I'm really stuck right now. Can you help? Thanx. David
  4. Hi again, while working with LoaderMax and the VideoLoader I realized I would be nice to have an event wrapper class for NetStream Events. In my opinion NetStream events are really painful to work with. I'm always looking into the documentation because the NetStream events are not accessible via constants. The following scenario. I build a video player with LoaderMax and I want to display a loader icon while buffering the video. Now what happens when the buffer is empty and the video still loading. If I didn't overlooked something I would have to do the following: _videoLoader.netStream.addEventListener( NetStatusEvent.NET_STATUS, handleNetStatus ); private function handleNetStatus( event:NetStatusEvent ):void { if( event.info.level == "status" ) { switch( event.info.code ) { case "NetStream.Buffer.Empty": // show loader icon break; case "NetStream.Buffer.Full": // hide loader icon break; } } } I think it would be nicer if it could be done like this: _videoLoader.addEventListener( NetStreamEvent.STATUS_BUFFER_EMPTY, handleNetStatus ); _videoLoader.addEventListener( NetStreamEvent.STATUS_BUFFER_FULL, handleNetStatus ); private function handleNetStatus( event:NetStreamEvent ):void { switch( event.type ) { case NetStreamEvent.STATUS_BUFFER_EMPTY: // show loader icon break; case NetStreamEvent.STATUS_BUFFER_FULL: // hide loader icon break; } } Looks way cleaner, doesn't it. And there is no need to look up any event strings from the docs. You immediately get what is being done. In my opinion there is a lot of potential regarding the netStream to make things a lot easier. What do you think?
  5. Hi, first of all thanks for creating LoaderMax. It makes my life so much easier and it immediately replaced my loading queue, which got stuck featurewise a long time ago. While working with the VideoLoader I experienced an issue which I'm not quite sure is related to LoaderMax. I set up a queue of several VideoLoader instances which should cache a FLV. After the first one is loaded only this one should play, while the others remain silent in the cache. After the first video is finished the second in the queue is played. And so on. You get the point. Here's the simplified version of my code: _queue = new LoaderMax(); for( var i:int = 0; i < array.length; i++ ) { _queue.append( new VideoLoader( "video"+i+".flv", { name:String(i), id:_vos.length, autoPlay:false, smoothing:true, bufferTime:5, bgColor:0x000000, width:716, height:403, scaleMode:ScaleMode.PROPORTIONAL_INSIDE } ) ); } _counter = 0; _queue.getLoader(String(_counter)).addEventListener( LoaderEvent.COMPLETE, handleVideoLoadingComplete ); _queue.load( ); private function handleVideoLoadingComplete( event:LoaderEvent ):void { VideoLoader(event.target).removeEventListener( LoaderEvent.COMPLETE, handleVideoLoadingComplete ); playVideo( _counter ); } private function playVideo( counter:int ):void { _counter = counter; var loader:VideoLoader = VideoLoader( _queue.getLoader(String(counter)) ); if( _activeVideo != null ) { _activeVideo.pauseVideo(); removeChild( _activeVideo.content ); _activeVideo.playProgress = 0; _activeVideo = null; } if( loader.status != LoaderStatus.COMPLETED ) { loader.addEventListener( LoaderEvent.COMPLETE, handleVideoLoadingComplete ); loader.prioritize( true ); } else { _activeVideo = loader; addChild( _activeVideo.content ); _activeVideo.playVideo(); } } I removed a lot of my code to illustrate to the issue I'm experiencing, which is that although I set the VideoLoader to autoPlay:false sometimes the sound of another video can be heard while the first one is playing. But only for a few seconds, like the autoPlay value set to late. Or is the bug in my code? Can I improve it in any way to make sure videos are only played when I want them to? My workaround for now would be to set the volume to 0 when appending the VideoLoader instances to the queue. Any help appreciated. Thanx. David
  6. Hi everyone, I'm having trouble with the TransformAroundCenter Plugin. I searched the forum but found nothing helpful so far. The Problem I'm experiencing is quite easy to demonstrate: 1) Go to this page: http://blog.greensock.com/tweenmax/ 2) Scroll down to the Plugin Explorer 3) Click example next to transformAroundCenter 4) change scaleX and scaleY to 0 and click "TWEEN" - everything works as it should 5) now change scaleX and scaleY back to 1 and click "TWEEN" again - the original registration point changed As far as I read in the forum this could have to do with the fact that the plugin relies an the getBounds() method. Is this true? Is there any way around this behaviour apart from moving the registration point of my clip and simply use scaleX and scaleY? Any help or hints appreciated.
×
×
  • Create New...