Jump to content
Search Community

crusy

Members
  • Posts

    7
  • Joined

  • Last visited

crusy's Achievements

0

Reputation

  1. Same here. A class handeling all the NetStream-Stuff, fallback, etc would be cool. I mean, hey, Greensock is about "not to reinvent the wheel", isn't it? BTW: StageVideo is the way to go on mobile/AIR...
  2. you're the man, that was the trick. for the record: _loader = new SWFLoader( 'video_chaptera.swf', { auditSize:false, autoPlay:false, onProgress:_onLoaderProgress } ); _loader.load(); private function _onLoaderProgress(event : Event) : void { trace( 'loaded: ' + _loader.progress ); if( _loader.rawContent ) { // do not address it twice, for garbage collection: if ( _loadedSWF == null && _loader.progress >= MIN_PERCENTAGE_LOADED ) { _loadedSWF = _loader.rawContent as MovieClip; // maybe it was no MovieClip? if( _loadedSWF ) { // the volume was set to 0 by {autoPlay:false} var st:SoundTransform = _loadedSWF.soundTransform; st.volume = 1; _loadedSWF.soundTransform = st; addChild( _loadedSWF ); _loadedSWF.gotoAndPlay( 1 ); } } } } The out-of-sync-problem: The sound was in a MC on the main timeline. So either you do an _loadedSWF['mySound'].gotoAndPlay(1) together with the _loadedSWF.gotoAndPlay( 1 ); from above - or you put the sound on the main timeline Thanks a lot!
  3. The sound is set to "stream" (took me a while to find that setting in CS5, I don't like that IDE crap ), but still the same problem: The video plays as soon as I want it to play, but the sound is not heard until the SWF is completely loaded... and than the sound is out of sync. The problem does not occur if I play the SWF directly
  4. Now autoPlay:false is necessary to preload the SWF. With its video data it is to large to have autoPlay be true... For the video it now works, but the sound will not play until the progress reaches 100%. Why is that so?
  5. Hmmm, maybe the error was just the "autoPlay:false" (which is a relict from a previous version where I wanted to preload the SWF before showing the view) I changed the relevant part to: _loader = new SWFLoader( 'video_chaptera.swf', { auditSize:false, onProgress:_onLoaderProgress } ); _loader.load(); private function _onLoaderProgress(event : Event) : void { if ( _loadedSWF == null && _loader.progress >= MIN_PERCENTAGE_LOADED ) { _loadedSWF = _loader.rawContent as MovieClip; if( _loadedSWF ) { addChild(_loadedSWF); } } } and it seems to work... I am still careful to say this What I still don't understand: As the video within the SWF is NOT encapsulated in a separate MC or something, but is on the same timeline as the sound (frame #100 of the SWF is frame #100 of the sound and frame #100 of the video as well!), and as the sound is playing - why is the video not playing (frame #100 of the SWF and the sound, but still frame #1 of the video)?
  6. Here's a preview if this helps: http://lennart.next.jvm.de/download/preview/ there are two "views" switched automatically. The first one is empty and shown for 1 second. The second one is shown for 10 seconds and contains the SWFLoader (and the SWF as soon as it is loaded). Then the first is shown again (to test the garbage collection) for 1 second and so on
  7. Hi, I have an swf containing a video and a separate sound lying on the timeline. I want to load it with SWFLoader and play it before the loading has finished. This works on my MacBook (Firefox 4.0.1, FP 10.2.x) at home, but neither on my Mac here at work nor on a Windows XP (IE 6, FP 10.2.159.1): The first frame of the video appears and I hear the sound playing, but the video is not playing... you can find a basic example here: http://lennart.next.jvm.de/download/as3 ... r_test.zip (the file is about 19 MB because of the SWF) Any idea? The fact that I can access both the video and the sound (instance name video_1 and sound_1) tells me the SWF is ready for access. The fact the sound is playing tells me the SWF is/gets loaded and plays. The video is on the same frames as the sound, but it's not playing! TIA, crusy
×
×
  • Create New...