Link to home
Start Free TrialLog in
Avatar of GloomyFriar
GloomyFriar

asked on

Internet Explorer + Flash = memory problem :(

Hello.

I have flash movie - .swf file ~2.5Mb. The flash is made as sequence of jpeg pictures
with transparency. And the flash is compressed.
When I add the movie to an html page and load the page into IE (Interner Explorer) - IE
allocate >130Mb of memory (I can see that in the Task Manager).
Are there any ways to prevent the IE from allocating so much memory?
May be I should make something special with the flash?

Thanks a lot in advance.
Avatar of Billystyx
Billystyx

load your jpgs at runtime with loadMovie("myjpg.jpg");
or
loadMovieNum("myjpg.jpg",1);
to save space

billystyx
SOLUTION
Avatar of rexmor
rexmor
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you don't already, make sure you have a preloader that loads all content before starting.  If it's loading while it's playing, it will really drag down the system.

-Sam
ahhahh!... yeah better add a preloader on the first frame of your movie since they are sequence of images.... sam is right...

regards

rexmor
Avatar of GloomyFriar

ASKER

2 Billystyx:
>load your jpgs at runtime with loadMovie("myjpg.jpg");
It's not acceptable. I need single swf file.

2 rexmor :
>try also reducing the frame per second (fps) of your movie
It's also impossible in my case.

2 sam85281 & rexmor:
What is the "preloader" and how to make it. Btw I doubt that it'll help
to reduce the memory usage. As I understand IE "preload" and possibly
decompress/decode whole the movie and then play it. But I can't undestand
the following thing. The movie is made from 532 240x180 pictures. So the total
decompressed memory we need is 240*180*4*532 = ~91Mb. But IE takes >130Mb :(
And is it possible to make the flash in such way that IE will decompress the movie
while playing frame-by-frame not whole movie once at start?

Maby thanks.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In my opinion the question has been answered - looking in the task manager is not anaccurate way of checking the size of the swf anyway, since as far as I am aware the task manager shows the processes of the application (IE), not the web page specificaly.
And a 2.5 mb swf (says in heading), but 93MB (further down in the posts) is going to load slowly unless the swf is broken up into smaller pieces and loaded when needed rather than all at once. Or, the jpgs cut down in size to make a smaller overall file.
And IE always has its own processes running with everything else.
The question I have is why is it being displayed in html for such a large file - for web use it seems far too big, and if its not for web use, play it in the flash projector.

Billystyx
2 Billystyx
>In my opinion the question has been answered
Question is answered when a solution is found, imho. I can't see a solution here.
You said about a "preloader". I've asked "What is the "preloader" and how to make it?"
There is no answer...

>looking in the task manager is not anaccurate way ...
It's accurate enough. But I can use something else if you can propose more "anaccurate way"

>... is going to load slowly ...
As I said I don't care how slowly it will be loaded. I care about memory usage only.

PS. I don't care about the points. I can add more points but for really working solution.
And I think you didn't earn the points.
with the task manager, take a look at any other program vs the size of the file it is loading - word may be a good example.
find a word doc, right click it and check the file size - lets say it is 20k.
Now open it in word, and check the task manager processes for word.exe - it will be over 10000k.
This does not mean the file itself is suddenly  10000k - just the program used to run it - it won't change markedly from there whether you load a word doc that is 1000k or one that is 5k. Does that make sense?
You can go into tool->options->view files->on the IE explorer menu to see the swf of the page you want to check, find the swf in the temp internet files list, right click it and check properties for the file size of the swf.
For the html page it is embedded in you can right click the page itself and check properties for file size too

for an example of a moviecliploader - got to

www.billystyx.co.uk/setups/fla8.zip

and you can download a flash fla example.

I hope this helps:)

billystyx
and BTW, if what you see here doesn't help - you would be best to keep asking questions in the same post, rather than deleting the question - we will do our best to help:)

good luck

billystyx
>with the task manager, take a look at any other program vs the size of the file it is loading ...
And what all this prove? Nothing ...

>you would be best to keep asking questions in the same post, rather than deleting ...
I tried to delete the question because of there was no new answers and the old answers are unhelpful.
Hmm, not sure what you mean when you say it proves nothing - what it proves is, it is the browser itself, not anything you are doing - it doesn't help but then perhaps the only answer avaible here is find a different browser or build one yourself...

And how about the movieclip loader - there is an example there, you didn't mention that.

Anyway,
the simple answer is that sometmes the answers are not what your are hoping for.

bil
>www.billystyx.co.uk/setups/fla8.zip
I've downloaded this. What's the next?
Could you provide me with step-by-step instructions, please?

Thanks.
Could you make the following to prove your concept, please.
Provide me with
1. Simple flash (.swf) with sequence of pictures and sound (as in my case) + easy html code which just play the flash in browser.
2. Modified (as you suggest) flash + html code which play the modified flash in browser.

If 2 will take less memory than 1 - I'll agree that you are right and this is a solution.
I hope you understand that the condition here is that 2 should looks (video and audio) exactly as 1 while plaing.

Thanks.
If I remember correctly, basically, you name the movie you want to load:
mov="myswf.swf";
name the level you want to load it to:
num=1;
and called the function
fpreloader();

It does the rest for you.

the function should always sit on the main timeline, and the calls to it can come from anywhere else, so long as you reference the code I just wrote with
_level0,
so _level0.mov="myswf.swf";
_level0.num=1;
_level0.fpreloader();

Does that make some sense?

If not, also try looking up the web for tutorials on the moviecliploader class. (Pictures are sometimes much more helpful).

Let me know how you go.

Billystyx
for video (dont recall mention of video until now), have a look at this macromedia article/tutorial
http://www.macromedia.com/devnet/mx/flash/articles/flv_download.html

the preloader will not decrease the file size (and will certainly not dramatically alter the processes used by IE - as mentioned earlier), it will just load the swf before playing it (so you don't have a blank screen for a half an hour).
If it wasn't video, you could load only what you needed to start with, and load other jpgs on press of a button in flash etc.
this would decrease the initial download time, but not the overall download time, but it would not change much the processing memory used by IE.

anyway, take a look at that article, because I think you're issue is not with IE processes, but with a 2.5 mg swf (which is rather large to be playing across the web).
billystyx

>I think you're issue is not with IE processes ...
I'm sure with IE process indeed. The problem is that IE (or Macromedia ActiveX which really play the flash)
don't free memory after a frame is played. It holds whole movie in memory, even already played part. And
this is the problem. I need a way to make it free memory which used by already played frames.
programme to free up unused memory from microsoft processes...

www.softpedia.com/progDownload/ Monitor--Free-RAM-Download-11422.html

forum on memory leaks with ie

http://www.codecomments.com/archive304-2005-1-186090.html


and this one

http://xinha.gogo.co.nz/punbb/viewtopic.php?pid=169
this is not a flash issue and cannot be resolved with flash - or by anyone for everyone except perhaps microsoft themselves...


and this, I have to say, is my final word on it - same as originally pointed out.

Please accept that you cannot fix IE, especially with flash..

Billystyx
You are not correct. It's a problem of the Macromedia ActiveX.
To prove this I just wrote program which play flash using the ActiveX.
And it use the memory almost exactly the same as IE.
So if the problem may be solved at all - the solution will be on "Macromedia side".
And once again, I can't see a solution here and don't understand why Lunchy
released the points.
What did you do it in?

You could look up stuff on the web for dealing with memory leaks etc in flash.ocx - there are plenty of sites out there on the flash.ocx in app building.
Even if you could find a solution(and the solution was a bug with flash.ocx and not IE speciffcally), you still couldn't fix everyone's flash.ocx.

This is not a solution, but it is an answer - your browser is not the answer - you have a 2.5 mg swf, that is your problem - most pages are no more tan 50 or 60k.
As a flash developer your primary concern should be getting the swf to the user as quickly and smoothly as possible, and that can be done with some of the options listed above.

Try loading an empty swf into your browser. How does the mem compare there?

billystyx
>What did you do it in?
It doesn't matter in this case. But I used MSVC++ if you think it will help.

>... you still couldn't fix everyone's flash.ocx ...
Sure. But possibly I can find a documented or not documented way to solve the problem via making something "special" with the flash file. And this is the question I asked for. If you are experts here you should understand what I'm talking about.

> ... As a flash developer your primary concern should be getting the swf to the user as quickly and smoothly as possible ...
I'm not a flash developer and as I said before I don't care about user etc in this case. The only thing I care is the memory usage.

>Try loading an empty swf into your browser. How does the mem compare there?
You can try it by yourself. This will not help regarding the problem I'm talking about.

If you still don't understand I'll try to explain once again.
If you have let's say 10min long flash ActiveX will hold whole 9min in memory when starting to play 10th minute.
And if assume that 1 minute needs 50Mb of memory then the memory usage in the task manager will be:
50Mb - after 1 minute
100Mb - after 2 minutes
150Mb - after 3 minutes
...
450Mb - after 9 minutes
...
etc.

And this is the problem.
If you aren't concerned about flash then you are at the wrong place - this is where we deal with flash. If you won't try stuff out, how can I help.
I have done everything possible to give you a fair go, but you don't seem interested.
The answer is, as I think I have said a few times before - there is no special fixes for asuch a thing - and if you won't try the things we suggest, you will not get far in flash.
(....can try it by yourself. This will not help regarding the problem I'm talking about.....

all the way throug this you have said - this will not help - this is not my problem...
I suggest going to a programming thread (maybe for vc++), flash developers work with flash - and flash is not a programming language - and it doesn't not have system access/programming ability for garbage collection etc.

You will not find an answer here - and (I am almost certain) you will not fix the problem - because it exists somewhere between the flash.ocx and IE, and neither of those things are changeable in terms of a solution for the web.

Good luck with it - I am going now:)

Billystyx

the points do not mean much to me either, to be honest - but when an answer has been given I do not agree with it being rejected simply because it is not an appreciated answer.





If the problem have no solutions - just say "there are no solutions".
May be something like 30 points will be ok for such answer, but not 300, imho.
By the way there is one thing which may help in solving the problem. But no
one here tell me about it. :( I've found it by myself - rather funny. May be I'm
an expert here? :)

>but you don't seem interested.
I'm interested, really interested. But the problem have no easy solution and may be have no solution at all. That's why I'm here and I'm asking experts about.

>You will not find an answer here...
I'm afraid you are right :(  And I'm hearing the words from man who took points for "working answer"  :)))

Thanks anyway.

2 Lunchy:
Once again, your decision is wrong.
btw, I did not take your points for a 'working' answer, I took your points for an answer to:

Are there any ways to prevent the IE from allocating so much memory?

IE is a very bulky program and seems to like using memory just for fun:)
...and
looking in the task manager is not anaccurate way of checking the size of the swf anyway, since as far as I am aware the task manager shows the processes of the application (IE), not the web page specificaly....
And IE always has its own processes running with everything else.


..and maybe there is something special I can do with flash -
preloading, and further on streaming or flv download...

... and finally, because the question seemed to get cut off to a number of ee experts when it was only warming up - you must provide feedback for people to keep posting - and a pleasant manner always helps (I find anyway)

>>you will not find an answer here - I was referring to your latter question - as I am sure you know- how to debug the (you think ocx, I think IE) in other words, programming. You WILL NOT find programming solutions here - this is flash.
Please do not manipulate my words in this way.



The question on how much it introduces to the memory for a very small swf as opposed to a very large one seemed relevant - but you didn't try - telling me I could try it. Why not?
I do not work for you - just try to help you.

Finally,

The questions asked here are not always answered by the 'experts', but it is a general rule of thumb in interests of preserving a good archive to provide the solution you discovered if you find the answer yourself.
Sites like this exist through the goodwill of the people using them, and the help avaiable on the web comes from places like this.

I hope you find a solution to your IE/Flash.ocx issue - please don't be bitter it couldn't be attained here - you did receive your answer ( there is no flash solution), but of course that doesn't necessarily help you.

It would be nice for you to take advice re the flash side from the flash experts though, rather than dismissing the importance of the design of the flash itself and focussing on the memory usage in IE when you came to flash for an answer:)(and not programming)

Billystyx









>I took your points for an answer to:
>Are there any ways to prevent the IE from allocating so much memory?
And what is you answer? "Yes" or "No"?
And I hope you understand that for 300 points I'm waiting not just "Yes" or "No" but more or less detailed explanation why (if "No") and how (if "Yes").

>IE is a very bulky program and seems to like using memory just for fun:)
You think it's an answer to the question?

>looking in the task manager is not anaccurate way of checking the size of the swf anyway ...
I don't "check the size of the swf" using the task manager. I check how much memory IE allocates to show my html page with
the swf inside. And as I already said before this way is accurate enough in this case.

>..and maybe there is something special I can do with flash -
>preloading, and further on streaming or flv download...
As we agreed (or not?) before preloading will not solve the problem, right?
streaming? ok, how to make it?
flv download? ok, what is this and how to make it?

>you will not find an answer here - I was referring to your latter question - as I am sure you know- how to debug the (you >think ocx, I think IE) in other words, programming.
I don't "think", I'm sure and I can prove it. This is "ocx".

>You WILL NOT find programming solutions here - this is flash.
I'm not searching for a "programming solutions here". I'm searching for a man who very friendly with flash, not just a good designer, but a man who REALLY UNDERSTAND HOW IT WORKS and 100% know all the features (documented and undocumented) of swf format and flash player ActiveX. Only having this kind of knowledges one can answer "Yes" or "No" to my question and explain why and how.


>The question on how much it introduces to the memory for a very small swf as opposed to a very large one seemed
>relevant - but you didn't try - telling me I could try it. Why not?
The following is not an answer to your question?
---50Mb - after 1 minute
---100Mb - after 2 minutes
--- ...


>you did receive your answer
No, I didn't  :(((

>( there is no flash solution),
I'm not sure about this. This is not proven. You just said that it's not possible, but I think you'll agree that you are not 100% sure :)

I'm 100% sure about it!  Flash doesn't get to make those decisions, the browser does.  The closest thing to a flash solution is to NOT use 532 images in one movie.  It's never done, everyone knows better.  It doesn't HAVE to be ONE swf.  You are choosing to make it one swf.  The information you have gotten is the information available.  Split your movie up, it'll never go smooth for you with 532 images!

-Sam
thanks Sam :)
2 Sam:

>I'm 100% sure about it!
As I already said before there is at least one possibility which was not discussed here. And until it is not discussed
no one can say that he is "100% sure".

>Flash doesn't get to make those decisions, the browser does.
Once again, as I already said (and prove with test) before that the problem is in Macromedia flash player ActiveX. So if a
solution could be found then the solution will be in flash.

>... Split your movie up ...
How to make this? I can tell you the same what I told to Billystyx :

Could you make the following to prove your concept, please.
Provide me with
1. Simple flash (.swf) with sequence of pictures and sound (as in my case) + easy html code which just play the flash in browser.
2. Modified (as you suggest) flash + html code which play the modified flash in browser.

If 2 will take less memory than 1 - I'll agree that you are right and this is a solution.
I hope you understand that the condition here is that 2 should looks (video and audio) exactly as 1 while plaing.

Thanks.
As I already said before there is at least one possibility which was not discussed here. And until it is not discussed
no one can say that he is "100% sure".

what does this mean?

do you know something we don't - it would be nice to share with us :)


flash.ocx is not flash - it may be necessary for flash to operate, but it is not flash itself. As a programmer, I would assume you would know this.

An active x component cannot be manipulated through flash - (not yet anyway). If you have a problem with this, contact MM, we deal with the interface as it stands now.

Again, If you have an idea on a fix, it would do well to share it with us.

and, if you want to test it, then test if - if you have trouble with elements of how to do this, we will be more than happy to help.

billystyx

Billystyx

>what does this mean?
>do you know something we don't - it would be nice to share with us :)
Yes I do. But I prefer you to find the possibility by yourself because of it's possible that you'll find something interesting (unknown for me) regarding the problem on the way.

>... flash.ocx is not flash ...
Hey man, I said "flash" in general, i.e. flash file format + flash "language" + the ActiveX, etc.

>If you have a problem with this, contact MM...
Course I've tried. But it's impossible :( At least "for free".
There are no comments again?  :(
Sam, are you gonna prove your suggestion or not?
Hello?
MHenry, have you read everything here attentively?
>It can't change the operating system or browser that a client it using.
I've already said several times (and proved it with test program), that the problem not inside OS or IE.
The problem is inside Macromedia Flash Player ActiveX. And ANY program which use the AX will take
memory in the same way.

>What needs to be understood is Billystyx cannot be expected to "fix" the software.
I didn't ask about such fixing.

>Excel and Word can't do graphics the way Illustrator or Photoshop can.
Are you kidding me? I'm a software developer and team leader with more than 12 years experience.
I'm asking a question only when tried everything and really can't solve the problem by myself. Take a look
to my questions history. Can you see an answered question there?

>What Billystyx did is provide a workable solution.
Where is the solution? May be he provided the solution somewhere else? I can't see a solution here.
If I need to decrease frame rate or the pictures size I can do it by myself. I don't need Billystyx's or
someone else's help for. I assumed that I asked my question to experts. And I very much regret that the
"experts" can't even understand what is the question about. If you think that I'm asking a wrong question
I can say that I asked the same question at several forums and peoples there at least understand
what I'm asking for.

>But Billystyx  supplied an answer that will work today.
I just want to see the "workable" solution. Once again, I already said about this. I'm ready to pay extra 500 or 1000 points for. But Billystyx can't provide the solution. Because of nothing proposed by him can be a "workable" solution in the case we are talking about.

>One that is commonly used ...
I'm here not just to find something "commonly used". I'm here to get a real expert help. And it's a pity that
I found no help here and even more - lost some points "just for fun" and spent a lot of time. :(

>I have to side with Billystyx here.
So I just can say that you are wrong too. As I already said there is at least one solution (not discussed here)
that possibly could help.

with best regards,
GF
>What Billystyx did is provide a workable solution.
Use a preloader and compress your jpg files. Use movie clips to load each in turn. There's your solution. It was given to you. Try it.

>But Billystyx  supplied an answer that will work today.
This method is in common use because it works. Try reading Flash web Design by Hillman Curtis. Industry standard doesn't mean it's wrong.

MHenry, have you read everything here attentively?
Just because you want to muck around with memory issues doesn't make it the best way to do it. Billystyx was trying to show you a better way to handle load times. Try it.

We understand your question. But we're trying to offer you a solution (call it a workaround if you wish) that works.

Best,

MH

>Use a preloader and compress your jpg files. Use movie clips to load each in turn.
>There's your solution. It was given to you. Try it.

Here is a qoute from one of Billystyx's comments:
Billystyx>the preloader will not decrease the file size (and will certainly not dramatically alter the processes used by IE - as Billystyx>mentioned earlier), it will just load the swf before playing it (so you don't have a blank screen for a half an hour).

So Billystyx (not me) said that it will not help to solve the problem. Right?
But I can say more - I've spent some time again (just to prove that it will not work) and have made such loader. It use the same memory in this case (as I was sure before making the test). I.e. it's NOT A SOLUTION. Additionally I got problems with sound - it's not syncronized with the pictures now.

>We understand your question.
If so, you should agree that there is no a "workable" answer here.

PS. I'm ready to try other "solutions" if you have some.

Thanks.
the sound problem is something the experts here can help directly - that is aflash  issue.
the preloader will decrease file size, but only if you break the swf up - that was mentioned somwhere above too - if you don't do that you will not decrease the file size. i offered a link for you to follow re flash strreaming:

http://www.macromedia.com/devnet/mx/flash/articles/flv_download.html

sam offered you this advice:

The closest thing to a flash solution is to NOT use 532 images in one movie

and i don't see how you expect a flash expert to be able to manipulate the flash.ocx for public use(across the wide world of the web). we (the flash experts) know what flash action script can do and what it can't do. please accept that.
It works how it works.
If you have a solution inside flash (which personally i can't believe) then do what we do - share your knowledge.

(m henry - my final say - i promise:)

billystyx
Gloomyfriar,

The pre-loader is only a part of the solution. Using Movie Clips is the other. An example would be:
Use preloader to load first movieclip. That movieclip would contain say, 10 of your jpgs. When that one starts playing it loads the next movieclip with another 10 jpgs, and so on. It's still one .swf and you can control the sound too. Try giving this a shot. It will work for you.

Another thing you need to consider: Flash is primarily a Vector delivery tool, not bitmap. Trying to load a bunch of jpgs into one movie is tough. That's why you need the movieclips and preloaders. If this was burned onto CDs or other media, you wouldn't need them. And also keep in mind that what you're seeing on your machine won't be what the public sees. Older computers are still out there so your sound and slides may not be in sync for them unless you do as we're suggesting.

This method is time-tested and used by the more professional Flash designers.

Honest, just trying to help.

MH



>Older computers are still out there so your sound and slides may not be in sync for them
>unless you do as we're suggesting.
The solution I have at the moment works really fine at almost any PC. The only problem is memory usage.
I can spend some time again and make as your suggest. But I really doubt that I'll be able to have video and
audio synchronized in this case. One thing is to "stream" just video or just audio, but stream the both and
have them synchronized - it's a bit another story. Right? If they are not syncronized even in the not splitted
(but "preloaded") flash you think they will be better synchronized when I split the flash into several parts?
I doubt about this.
So, once again, I'm ready to spend time (again) for this, but firstly I wanna know if you are ready to return
my points back if this will not work again?

2 Billystyx:
>share your knowledge.
For what? I'm here to get help and to pay for the help. I've already spent a lot of time and health here and have lost
some points. On the other hand I still can't see a solution. And additionally you want me to "share your knowledge".
Just Great! May be I should attach some CC numbers too?  ;-)
And one more thing.
"jpeg pictures with transparency" is written in the first post.
I can't get transparency using you "solution".
Just so you know - EE experts are volunteers. We share knowledge because it makes us feel good to do so - and because others on the web were generous enough to share their knowledge with us for us to get where we are now:)
>We share knowledge because it makes us feel good to do so
If so, could you give my points back, please :-D

By the way, take a look:
https://www.experts-exchange.com/premiumServices.jsp?redirectURL=%2FWeb%2FWebDevSoftware%2FFlash%2FQ_21404756.html®istrationSource=50

:-D
>I have added 300 points to your point total
:)  Thanks.

But I dispute here not just to get the points back. I'm interested to find a solution.
So if someone can provide workable solution and prove it with demo I'll be more than happy
to give him reasonable amount of points.

GF