Streaming and chaining swf:s without glitches and memoryleak

  • basse
  • Born
  • Born
  • No Avatar
  • Joined: Mar 10, 2004
  • Posts: 3
  • Status: Offline

Post March 10th, 2004, 12:52 pm

I'm writing an application that streams "live" JPEG images in swf format.
I'm doing this by using the SWF specification directly and not using high level ActionScript.
To be nice towards the player/browser I limit the number of frames and
then does an ActionGetURL2 to a higher _level (to avoid glitches in
the display).
In the new sf file I do an ActionRemoveSprite("_parent") to hopefully unload the previous level - however, memory usage still increases (1MB every couple of seconds).

When I reload the swf to the same level, memory usage is ok, but
the display flickers between swf:s.
Just keep on increasing the _level might not work for long term streaming either so a solution to that would be nice as well.

Any hints?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 10th, 2004, 12:52 pm

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post March 10th, 2004, 1:15 pm

I'm guessing this is AS2.0 because I have no clue what ActionGetURL2() and ActionRemoveSprite() are.

I'm still stuck in the AS1.0 era, sorry I can't be of much help :(
  • basse
  • Born
  • Born
  • No Avatar
  • Joined: Mar 10, 2004
  • Posts: 3
  • Status: Offline

Post March 10th, 2004, 1:25 pm

The methods I mention is what's in the .swf file and what the ActionScript is compiled to (I guess loadMovieNum() and unloadMovieNum() is mapped to those more or less directly).
(I don't use ActionScript I encode the swf directly)
  • basse
  • Born
  • Born
  • No Avatar
  • Joined: Mar 10, 2004
  • Posts: 3
  • Status: Offline

Post March 11th, 2004, 4:14 pm

It seems to work if I alternate between _level1 and _level2.
If I load a movie to _level0 there will be glitches.
All needed now is to determine when _level1 has been loaded
by _level2 so it's safe to remove the image from _level2
without flickering...
  • IMMORTAL
  • Beginner
  • Beginner
  • User avatar
  • Joined: Mar 13, 2004
  • Posts: 45
  • Status: Offline

Post March 13th, 2004, 9:12 pm

There is a way to update the contents of a movie clip with:
Code: [ Select ]
targetClip.loadMovie(imagePath)

(where targetClip is the name of the movie clip on stage and imagePath is a URL)

It might be the solution to the memory problem.

The sample I have doesn't really flicker, so it might even be a solution to the glitch too.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 71 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.