News:

If you need instructions on how to get through the hotels, check out the enclosed instruction book.

Main Menu

stream swf's?

Farted by SpongeClock SquarePants, April 06, 2009, 09:44:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SpongeClock SquarePants

Is it possible to start playing progressively downloaded swf when they are still not fully loaded. (for example the swf starts playing when the currentbytes == totalbytes/2)

Sinister Clock

play();
Or that exact way you just mentioned.

Loki Clock

Yeah, but swfs load by movie clip in alphabetical order, not order of appearance. I think you could make sure all the elements from the first X seconds are loaded first if you check "export for actionscript > export in first frame" on the symbol's preferences, then using actionscript check to see if all of the symbols you checked are loaded. When all of them are loaded, make the "play now" button appear.

Slurpee

Quote from: Loki Klokka;1557469Yeah, but swfs load by movie clip in alphabetical order, not order of appearance.
lol

RomanClock

Lol, it should work if you just play it.
lemayo lol :soups:

SpongeClock SquarePants

i mean loading external swf's into a parent movieclip, and having full control over their behaviour.

example for what im doing now:

                    var swfpre = new URLRequest(view.playlist[0]['file']);         
         
         ldr = new Loader;         
         ldr.load(swfpre);            
         ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,  prerollswfLoaded);            
                  
         etc.

RomanClock

Quote from: SCSP;1557832i mean loading external swf's into a parent movieclip, and having full control over their behaviour.

example for what im doing now:

                    var swfpre = new URLRequest(view.playlist[0]['file']);         
         
         ldr = new Loader;         
         ldr.load(swfpre);            
         ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,  prerollswfLoaded);            
                  
         etc.

Full control is not very specific, there's a few different ways to set this up, each has advantages and disadvantages.
If you just want to play or stop, you should just be able to movieClip.loadMovie(URL); and then use movieClip.stop();/play(); to do that.
If you want to actually track how much is loaded then you would use something similar to what you have above.
lemayo lol :soups:

Blue

Quote from: Loki Klokka;1557469Yeah, but swfs load by movie clip in alphabetical order, not order of appearance.

This is inaccurate.

All SWF files stream by default.

If you publish preview you will see how things are loaded, the flash plays frame by frame, and pauses if the movieclips that exist on the next frame are not loaded yet. When they are, play is resumed. This is why often a pre-loader is not necessary, if you structure the timeline properly. Remember, all movieclips on a frame must be loaded even if it is alpha 0 or invisible in order for that frame to play.
[FLASH=http://files.myfrogbag.com/mupff0/snowflake.swf]width=670 height=200 quality=medium wmode=transparent[/FLASH]